summaryrefslogtreecommitdiff
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-02-05 02:21:06 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2010-03-03 14:07:59 -0500
commitd498b25a4f877be535246c4e5b6ee5890781a477 (patch)
tree15c92bc7265bc615604c722e08195c728369fab7 /fs/namespace.c
parent47cd813f2984569570021ce3d34cdf9cb20aa6a2 (diff)
downloadkernel-common-d498b25a4f877be535246c4e5b6ee5890781a477.tar.gz
kernel-common-d498b25a4f877be535246c4e5b6ee5890781a477.tar.bz2
kernel-common-d498b25a4f877be535246c4e5b6ee5890781a477.zip
get rid of useless vfsmount_lock use in put_mnt_ns()
It hadn't been needed since we'd sanitized the logics in mark_mounts_for_expiry() (which, in turn, used to be a rudiment of bad old times when namespace_sem was per-ns). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 970fe79d7867..b0b15cc2117c 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2344,17 +2344,13 @@ void __init mnt_init(void)
void put_mnt_ns(struct mnt_namespace *ns)
{
- struct vfsmount *root;
LIST_HEAD(umount_list);
- if (!atomic_dec_and_lock(&ns->count, &vfsmount_lock))
+ if (!atomic_dec_and_test(&ns->count))
return;
- root = ns->root;
- ns->root = NULL;
- spin_unlock(&vfsmount_lock);
down_write(&namespace_sem);
spin_lock(&vfsmount_lock);
- umount_tree(root, 0, &umount_list);
+ umount_tree(ns->root, 0, &umount_list);
spin_unlock(&vfsmount_lock);
up_write(&namespace_sem);
release_mounts(&umount_list);