aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2009-06-22 15:09:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-23 00:28:25 -0400
commit616511d039af402670de8500d0e24495113a9cab (patch)
tree825a34ab670dedc463ba7252a177793746c010c7 /fs
parent31950eb66ff47c946fd9c65c2f8c94b6b7ba13fc (diff)
VFS: Uninline the function put_mnt_ns()
In order to allow modules to use it without having to export vfsmount_lock. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/namespace.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 2dd333b0fe7f..6645846f2056 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2246,10 +2246,14 @@ void __init mnt_init(void)
2246 init_mount_tree(); 2246 init_mount_tree();
2247} 2247}
2248 2248
2249void __put_mnt_ns(struct mnt_namespace *ns) 2249void put_mnt_ns(struct mnt_namespace *ns)
2250{ 2250{
2251 struct vfsmount *root = ns->root; 2251 struct vfsmount *root;
2252 LIST_HEAD(umount_list); 2252 LIST_HEAD(umount_list);
2253
2254 if (!atomic_dec_and_lock(&ns->count, &vfsmount_lock))
2255 return;
2256 root = ns->root;
2253 ns->root = NULL; 2257 ns->root = NULL;
2254 spin_unlock(&vfsmount_lock); 2258 spin_unlock(&vfsmount_lock);
2255 down_write(&namespace_sem); 2259 down_write(&namespace_sem);