summaryrefslogtreecommitdiff
path: root/include/linux/namespace.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.ninka.net>2003-07-18 09:29:39 -0700
committerDavid S. Miller <davem@nuts.ninka.net>2003-07-18 09:29:39 -0700
commit86df0e66c0ea429cc38d966be1bfcd856941e05c (patch)
tree1f6d70a8440bcfa3298e2a5d8bf2054b740d8e32 /include/linux/namespace.h
parent911e72b5a6b5492938e6763798ca120353ea9355 (diff)
parent1d02c2c0dfe098493f1359da83f1f2ba551f40a6 (diff)
Merge nuts.ninka.net:/home/davem/src/BK/network-2.5
into nuts.ninka.net:/home/davem/src/BK/net-2.5
Diffstat (limited to 'include/linux/namespace.h')
-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)