From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J. Bruce Fields" Subject: [PATCH 08/11] dcache: d_find_alias needn't recheck IS_ROOT && DCACHE_DISCONNECTED Date: Wed, 4 Jun 2014 17:21:00 -0400 Message-ID: <1401916863-7916-9-git-send-email-bfields@redhat.com> References: <1401916863-7916-1-git-send-email-bfields@redhat.com> Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org, "J. Bruce Fields" To: Al Viro Return-path: Received: from fieldses.org ([174.143.236.118]:48770 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751685AbaFDVVa (ORCPT ); Wed, 4 Jun 2014 17:21:30 -0400 In-Reply-To: <1401916863-7916-1-git-send-email-bfields@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: From: "J. Bruce Fields" If we get to this point and discover the dentry is not a root dentry, or not DCACHE_DISCONNECTED--great, we always prefer that anyway. Signed-off-by: J. Bruce Fields --- fs/dcache.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/dcache.c b/fs/dcache.c index 9209479..671a04a 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -730,12 +730,9 @@ again: alias = discon_alias; spin_lock(&alias->d_lock); if (S_ISDIR(inode->i_mode) || !d_unhashed(alias)) { - if (IS_ROOT(alias) && - (alias->d_flags & DCACHE_DISCONNECTED)) { - __dget_dlock(alias); - spin_unlock(&alias->d_lock); - return alias; - } + __dget_dlock(alias); + spin_unlock(&alias->d_lock); + return alias; } spin_unlock(&alias->d_lock); goto again; -- 1.7.9.5