From: Steve Guminski Date: Wed, 7 Dec 2016 13:02:52 +0000 (-0500) Subject: LU-8891 llite: rcu-walk check should not depend on statahead X-Git-Tag: 2.10.0-RC1~30 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F95%2F24195%2F3;p=fs%2Flustre-release.git LU-8891 llite: rcu-walk check should not depend on statahead 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 Change-Id: I0dcfd594c1b44cba1741c60a24ed623ef635b79c Reviewed-on: https://review.whamcloud.com/24195 Reviewed-by: John L. Hammond Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- diff --git a/lustre/llite/dcache.c b/lustre/llite/dcache.c index 6b2fdf3..6da6b59 100644 --- a/lustre/llite/dcache.c +++ b/lustre/llite/dcache.c @@ -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; }