提交 54c33e7f 编写于 作者: M Miklos Szeredi 提交者: Al Viro

vfs: do_last(): make ENOENT exit RCU safe

This will allow this code to be used in RCU mode.
Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 d45ea867
......@@ -2361,8 +2361,10 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
BUG_ON(nd->flags & LOOKUP_RCU);
inode = path->dentry->d_inode;
error = -ENOENT;
if (!inode)
goto exit_dput;
if (!inode) {
path_to_nameidata(path, nd);
goto exit;
}
if (should_follow_link(inode, !symlink_ok)) {
if (nd->flags & LOOKUP_RCU) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册