提交 74ff0ffc 编写于 作者: A Al Viro

namei: simplify invalidation logics in lookup_dcache()

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 e9742b53
......@@ -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);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册