put_mnt_ns(): use drop_collected_mounts()
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 17 Sep 2013 01:19:20 +0000 (21:19 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 25 Oct 2013 03:34:52 +0000 (23:34 -0400)
... rather than open-coding it

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

index da5c494834306178dc9efd3b3826d1b7f0e0d17b..5918fc31a636fd7c9e213d736af248dfc225b129 100644 (file)
@@ -2802,11 +2802,7 @@ void put_mnt_ns(struct mnt_namespace *ns)
 {
        if (!atomic_dec_and_test(&ns->count))
                return;
-       namespace_lock();
-       br_write_lock(&vfsmount_lock);
-       umount_tree(ns->root, 0);
-       br_write_unlock(&vfsmount_lock);
-       namespace_unlock();
+       drop_collected_mounts(&ns->root->mnt);
        free_mnt_ns(ns);
 }