* [PATCH] orangefs: reverse sense of revalidate is-inode-stale test
@ 2018-01-26 21:49 Martin Brandenburg
0 siblings, 0 replies; only message in thread
From: Martin Brandenburg @ 2018-01-26 21:49 UTC (permalink / raw
To: hubcap, linux-kernel, linux-fsdevel, devel; +Cc: Martin Brandenburg
It was wrong.
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
---
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.14.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-01-26 21:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-26 21:49 [PATCH] orangefs: reverse sense of revalidate is-inode-stale test Martin Brandenburg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.