From d054c3d4c173a41ca7c74ebe361d6de2e7aa507a Mon Sep 17 00:00:00 2001 From: Steve Guminski Date: Wed, 7 Dec 2016 08:02:52 -0500 Subject: [PATCH] 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 --- lustre/llite/dcache.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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; } -- 1.8.3.1