dup_mnt_ns(): get rid of pointless grabbing of vfsmount_lock
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 17 Sep 2013 02:22:16 +0000 (22:22 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 25 Oct 2013 03:34:55 +0000 (23:34 -0400)
mnt_list is protected by namespace_sem, not vfsmount_lock

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

index 0e54ad6ccd8a0aa85f09214a9751f3a8e336f2b2..17ff1470b4052d78ed1ed836d6dfaf81155501f2 100644 (file)
@@ -2444,9 +2444,7 @@ static struct mnt_namespace *dup_mnt_ns(struct mnt_namespace *mnt_ns,
                return ERR_CAST(new);
        }
        new_ns->root = new;
-       br_write_lock(&vfsmount_lock);
        list_add_tail(&new_ns->list, &new->mnt_list);
-       br_write_unlock(&vfsmount_lock);
 
        /*
         * Second pass: switch the tsk->fs->* elements and mark new vfsmounts