Whamcloud - gitweb
b=19933 control DCACHE_LUSTRE_INVALID flag with MDS_INODELOCK_LOOKUP lock
authorFan Yong <Yong.Fan@Sun.COM>
Wed, 10 Mar 2010 16:11:51 +0000 (00:11 +0800)
committerJohann Lombardi <johann@sun.com>
Wed, 10 Mar 2010 17:10:48 +0000 (18:10 +0100)
"DCACHE_LUSTRE_INVALID" is controlled by "MDS_INODELOCK_LOOKUP" lock which is corresponding to "IT_LOOKUP", do not skip invalidate for other intent.

i=robert.read
i=johann

lustre/llite/dcache.c

index 3ab4444..22a929d 100644 (file)
@@ -408,9 +408,6 @@ int ll_revalidate_it(struct dentry *de, int lookup_flags,
                 GOTO(out_sa, rc);
         }
 
-        if ((de->d_flags & DCACHE_LUSTRE_INVALID) == 0)
-                GOTO(out_sa, rc = 1);
-
         exp = ll_i2mdcexp(de->d_inode);
 
         /* Never execute intents for mount points.
@@ -430,6 +427,9 @@ int ll_revalidate_it(struct dentry *de, int lookup_flags,
         ll_frob_intent(&it, &lookup_it);
         LASSERT(it);
 
+        if (it->it_op == IT_LOOKUP && !(de->d_flags & DCACHE_LUSTRE_INVALID))
+                GOTO(out_sa, rc = 1);
+
         ll_prepare_mdc_op_data(&op_data, parent, de->d_inode,
                                de->d_name.name, de->d_name.len, 0, NULL);