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

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

vfs: do_last(): make exit RCU safe



Allow returning from do_last() with LOOKUP_RCU still set on the "out:" and
"exit:" labels.

Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 697f514d
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2383,7 +2383,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
out:
out:
	if (want_write)
	if (want_write)
		mnt_drop_write(nd->path.mnt);
		mnt_drop_write(nd->path.mnt);
	path_put(&nd->path);
	terminate_walk(nd);
	return filp;
	return filp;


exit_mutex_unlock:
exit_mutex_unlock: