Whamcloud - gitweb
b=7412
authoralex <alex>
Sun, 28 Aug 2005 13:14:33 +0000 (13:14 +0000)
committeralex <alex>
Sun, 28 Aug 2005 13:14:33 +0000 (13:14 +0000)
r=ericm

 - keep FLSIZE for non-regular files

lustre/mds/handler.c

index e952fc5..04c6f4f 100644 (file)
@@ -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));