Whamcloud - gitweb
LU-8891 llite: rcu-walk check should not depend on statahead 95/24195/3
authorSteve Guminski <stephenx.guminski@intel.com>
Wed, 7 Dec 2016 13:02:52 +0000 (08:02 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 13 Jun 2017 16:55:08 +0000 (16:55 +0000)
Moves the check for the LOOKUP_RCU flag, so that it does not depend
on the statahead setting.  The caller is now informed if rcu-walk
was requested but the filesystem does not support it, regardless
of whether statahead is enabled or disabled.

Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I0dcfd594c1b44cba1741c60a24ed623ef635b79c
Reviewed-on: https://review.whamcloud.com/24195
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
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 (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
 
 #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;
 }
 
        return 1;
 }