]> git.karo-electronics.de Git - linux-beck.git/commitdiff
clone_private_mount() doesn't need to touch namespace_sem
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 20 Nov 2016 04:23:18 +0000 (23:23 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 16 Dec 2016 21:30:49 +0000 (16:30 -0500)
not for CL_PRIVATE clone_mnt()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namespace.c

index a1a04dd1ebfc403a11765dba590eedc34535d21a..ec726ae0057946a1554137fc1f4489b8e47e1462 100644 (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);