summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2003-07-17 19:26:41 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-07-17 19:26:41 -0700
commit16096694244311a9b2464d83b10b8a339ecedd56 (patch)
tree51ae0cc406a3650cfa8aa3aaa115aa55c1c29139 /include
parent909cc4ae86f3380152a18e2a3c44523893ee11c4 (diff)
[PATCH] unline most of put_namespace()
It has five callsites, and is big.
Diffstat (limited to 'include')
-rw-r--r--include/linux/namespace.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/include/linux/namespace.h b/include/linux/namespace.h
index b5699538afac..fdd8abb07386 100644
--- a/include/linux/namespace.h
+++ b/include/linux/namespace.h
@@ -14,17 +14,12 @@ struct namespace {
extern void umount_tree(struct vfsmount *);
extern int copy_namespace(int, struct task_struct *);
+void __put_namespace(struct namespace *namespace);
static inline void put_namespace(struct namespace *namespace)
{
- if (atomic_dec_and_test(&namespace->count)) {
- down_write(&namespace->sem);
- spin_lock(&vfsmount_lock);
- umount_tree(namespace->root);
- spin_unlock(&vfsmount_lock);
- up_write(&namespace->sem);
- kfree(namespace);
- }
+ if (atomic_dec_and_test(&namespace->count))
+ __put_namespace(namespace);
}
static inline void exit_namespace(struct task_struct *p)