2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-17 09:43:59 +08:00

namei: simplify invalidation logics in lookup_dcache()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2016-03-05 22:37:46 -05:00
parent e9742b5332
commit 74ff0ffc7f

View File

@ -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);
}
}
}