mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 14:12:06 +00:00
vfs: do_last(): make ENOENT exit RCU safe
This will allow this code to be used in RCU mode. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
d45ea86792
commit
54c33e7f95
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user