Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54c33e7f authored by Miklos Szeredi's avatar Miklos Szeredi Committed by Al Viro
Browse files

vfs: do_last(): make ENOENT exit RCU safe



This will allow this code to be used in RCU mode.

Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent d45ea867
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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) {