Whamcloud - gitweb
LU-8891 llite: rcu-walk check should not depend on statahead
[fs/lustre-release.git] / lustre / llite / dcache.c
index 6b2fdf3..6da6b59 100644 (file)
@@ -328,15 +328,14 @@ static int ll_revalidate_dentry(struct dentry *dentry,
        if (lookup_flags & LOOKUP_REVAL)
                return 0;
 
-       if (!dentry_may_statahead(dir, dentry))
-               return 1;
-
 #ifndef HAVE_DCACHE_LOCK
        if (lookup_flags & LOOKUP_RCU)
                return -ECHILD;
 #endif
 
-       ll_statahead(dir, &dentry, dentry->d_inode == NULL);
+       if (dentry_may_statahead(dir, dentry))
+               ll_statahead(dir, &dentry, dentry->d_inode == NULL);
+
        return 1;
 }