Skip to content

Commit

Permalink
namei: simplify invalidation logics in lookup_dcache()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Mar 14, 2016
1 parent e9742b5 commit 74ff0ff
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 74ff0ff

Please sign in to comment.