Whamcloud - gitweb
b=7178
authoralex <alex>
Wed, 24 Aug 2005 21:49:24 +0000 (21:49 +0000)
committeralex <alex>
Wed, 24 Aug 2005 21:49:24 +0000 (21:49 +0000)
r=tappro

 - avoid possibility to FLSIZE being sent back to client w/o checking

lustre/mds/handler.c

index 26fccc6..e4eddc3 100644 (file)
@@ -1459,6 +1459,10 @@ int mds_getattr_size(struct obd_device *obd, struct dentry *dentry,
 
         LASSERT(body != NULL);
 
+        /* 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);