From: alex Date: Sun, 28 Aug 2005 13:14:33 +0000 (+0000) Subject: b=7412 X-Git-Tag: 1.4.10~634 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=7ae20f491c2ff43a62f110b857b13cd57675ac21;p=fs%2Flustre-release.git b=7412 r=ericm - keep FLSIZE for non-regular files --- diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index e952fc5..04c6f4f 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -1459,13 +1459,13 @@ int mds_getattr_size(struct obd_device *obd, struct dentry *dentry, LASSERT(body != NULL); + if (dentry->d_inode == NULL || !S_ISREG(inode->i_mode)) + RETURN(0); + /* XXX: quite a ugly hack, need to check old code * drop FLSIZE/FLBLOCKS prior any checking to */ body->valid &= ~(OBD_MD_FLSIZE | OBD_MD_FLBLOCKS); - if (dentry->d_inode == NULL || !S_ISREG(inode->i_mode)) - RETURN(0); - if (obd->obd_recovering) { CDEBUG(D_INODE, "size for "DLID4" is unknown yet (recovering)\n", OLID4(&body->id1));