X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fobdclass%2Fobdo.c;h=390c23415176a22dfe57308421fc85fa8d9016d5;hb=11c63d251e4d121bab0e97ccd69e9fd6d5ba38e4;hp=9da24053afb34f85cda64215288dd9eb3568aaa0;hpb=f95393b0d0a59cf3dc2f29cffc35dcc4cc9d7728;p=fs%2Flustre-release.git diff --git a/lustre/obdclass/obdo.c b/lustre/obdclass/obdo.c index 9da2405..390c234 100644 --- a/lustre/obdclass/obdo.c +++ b/lustre/obdclass/obdo.c @@ -28,6 +28,8 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. + * + * Copyright (c) 2012, Whamcloud, Inc. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -85,7 +87,7 @@ void obdo_from_inode(struct obdo *dst, struct inode *src, struct lu_fid *parent, newvalid |= OBD_MD_FLCTIME; } if (valid & OBD_MD_FLSIZE) { - dst->o_size = src->i_size; + dst->o_size = i_size_read(src); newvalid |= OBD_MD_FLSIZE; } if (valid & OBD_MD_FLBLOCKS) { /* allocation of space (x512 bytes) */