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>
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;
}