2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-19 10:44:14 +08:00

clone_private_mount() doesn't need to touch namespace_sem

not for CL_PRIVATE clone_mnt()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2016-11-19 23:23:18 -05:00
parent f4cc1c3810
commit 066715d3fd

View File

@ -1795,9 +1795,7 @@ struct vfsmount *clone_private_mount(struct path *path)
if (IS_MNT_UNBINDABLE(old_mnt))
return ERR_PTR(-EINVAL);
down_read(&namespace_sem);
new_mnt = clone_mnt(old_mnt, path->dentry, CL_PRIVATE);
up_read(&namespace_sem);
if (IS_ERR(new_mnt))
return ERR_CAST(new_mnt);