namei: simplify invalidation logics in lookup_dcache()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
e9742b5332
commit
74ff0ffc7f
10
fs/namei.c
10
fs/namei.c
|
@ -1458,14 +1458,10 @@ static struct dentry *lookup_dcache(struct qstr *name, struct dentry *dir,
|
||||||
if (dentry->d_flags & DCACHE_OP_REVALIDATE) {
|
if (dentry->d_flags & DCACHE_OP_REVALIDATE) {
|
||||||
error = d_revalidate(dentry, flags);
|
error = d_revalidate(dentry, flags);
|
||||||
if (unlikely(error <= 0)) {
|
if (unlikely(error <= 0)) {
|
||||||
if (error < 0) {
|
if (!error)
|
||||||
dput(dentry);
|
|
||||||
return ERR_PTR(error);
|
|
||||||
} else {
|
|
||||||
d_invalidate(dentry);
|
d_invalidate(dentry);
|
||||||
dput(dentry);
|
dput(dentry);
|
||||||
dentry = NULL;
|
return ERR_PTR(error);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue