Whamcloud - gitweb
b=19151
authorpravins <pravins>
Tue, 2 Jun 2009 06:25:21 +0000 (06:25 +0000)
committerpravins <pravins>
Tue, 2 Jun 2009 06:25:21 +0000 (06:25 +0000)
i=Oleg
use IT_LOOKUP to get inode attributes.

lustre/llite/dcache.c
lustre/llite/file.c

index 02aeac5..cf1f734 100644 (file)
@@ -394,7 +394,11 @@ int ll_revalidate_it(struct dentry *de, int lookup_flags,
         }
 
         /* Never execute intents for mount points.
-         * need to get attributes in case it got changed from other client */
+         * Attributes will be fixed up in ll_inode_revalidate_it */
+        if (d_mountpoint(de))
+                GOTO(out_sa, rc = 1);
+
+        /* need to get attributes in case root got changed from other client */
         if (de == de->d_sb->s_root) {
                 rc = __ll_inode_revalidate_it(de, it, MDS_INODELOCK_LOOKUP);
                 if (rc == 0)
@@ -402,9 +406,6 @@ int ll_revalidate_it(struct dentry *de, int lookup_flags,
                 GOTO(out_sa, rc);
         }
 
-        if (d_mountpoint(de))
-                GOTO(out_sa, rc = 1);
-
         exp = ll_i2mdexp(de->d_inode);
 
         OBD_FAIL_TIMEOUT(OBD_FAIL_MDC_REVALIDATE_PAUSE, 5);
index b608ff9..68785b9 100644 (file)
@@ -2436,7 +2436,7 @@ int ll_inode_permission(struct inode *inode, int mask, struct nameidata *nd)
         * need to do it before permission check. */
 
         if (inode == inode->i_sb->s_root->d_inode) {
-                struct lookup_intent it = { .it_op = IT_GETATTR };
+                struct lookup_intent it = { .it_op = IT_LOOKUP };
 
                 rc = __ll_inode_revalidate_it(inode->i_sb->s_root, &it,
                                               MDS_INODELOCK_LOOKUP);