From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932238AbdK1UW7 (ORCPT ); Tue, 28 Nov 2017 15:22:59 -0500 Received: from mail-yb0-f196.google.com ([209.85.213.196]:41803 "EHLO mail-yb0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754246AbdK1UWs (ORCPT ); Tue, 28 Nov 2017 15:22:48 -0500 X-Google-Smtp-Source: AGs4zMbeR7/WsGWqDz9GcrwwE9DzUBkx7j25RGqD+0fokAdXiP33o+qpZiikuvSB2/pE9EKCVk5ZIg== From: Martin Brandenburg To: hubcap@omnibond.com, devel@lists.orangefs.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Martin Brandenburg Subject: [PATCH 5/5] orangefs: reverse sense of revalidate is-inode-stale test Date: Tue, 28 Nov 2017 15:22:01 -0500 Message-Id: <20171128202201.8717-6-martin@omnibond.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171128202201.8717-1-martin@omnibond.com> References: <20171128202201.8717-1-martin@omnibond.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Martin Brandenburg --- fs/orangefs/dcache.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/fs/orangefs/dcache.c b/fs/orangefs/dcache.c index ae782df5c063..c7aa5c923477 100644 --- a/fs/orangefs/dcache.c +++ b/fs/orangefs/dcache.c @@ -118,8 +118,12 @@ static int orangefs_d_revalidate(struct dentry *dentry, unsigned int flags) return 0; /* We do not need to continue with negative dentries. */ - if (!dentry->d_inode) - goto out; + if (!dentry->d_inode) { + gossip_debug(GOSSIP_DCACHE_DEBUG, + "%s: negative dentry or positive dentry and inode valid.\n", + __func__); + return 1; + } /* Now we must perform a getattr to validate the inode contents. */ @@ -129,14 +133,7 @@ static int orangefs_d_revalidate(struct dentry *dentry, unsigned int flags) __FILE__, __func__, __LINE__); return 0; } - if (ret == 0) - return 0; - -out: - gossip_debug(GOSSIP_DCACHE_DEBUG, - "%s: negative dentry or positive dentry and inode valid.\n", - __func__); - return 1; + return !ret; } const struct dentry_operations orangefs_dentry_operations = { -- 2.15.0