diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-03-06 03:37:46 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-03-14 04:15:31 (GMT) |
commit | 74ff0ffc7f0682cb4c00252807d76116b95ecb9e (patch) | |
tree | 0359a12ca14101321e4ab0118ac8bea9fa9a7bd0 /fs/namei.c | |
parent | e9742b5332061bf885d8dd95d17e18a1b21371fa (diff) | |
download | linux-74ff0ffc7f0682cb4c00252807d76116b95ecb9e.tar.xz |
namei: simplify invalidation logics in lookup_dcache()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -1458,14 +1458,10 @@ static struct dentry *lookup_dcache(struct qstr *name, struct dentry *dir, if (dentry->d_flags & DCACHE_OP_REVALIDATE) { error = d_revalidate(dentry, flags); if (unlikely(error <= 0)) { - if (error < 0) { - dput(dentry); - return ERR_PTR(error); - } else { + if (!error) d_invalidate(dentry); - dput(dentry); - dentry = NULL; - } + dput(dentry); + return ERR_PTR(error); } } } |