From 7ae20f491c2ff43a62f110b857b13cd57675ac21 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 28 Aug 2005 13:14:33 +0000 Subject: [PATCH] b=7412 r=ericm - keep FLSIZE for non-regular files --- lustre/mds/handler.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)); -- 1.8.3.1