5 #include <linux/mount.h>
6 #include <linux/sched.h>
10 struct vfsmount
* root
;
11 struct list_head list
;
12 struct rw_semaphore sem
;
15 extern void umount_tree(struct vfsmount
*);
16 extern int copy_namespace(int, struct task_struct
*);
17 extern void __put_namespace(struct namespace *namespace);
19 static inline void put_namespace(struct namespace *namespace)
21 if (atomic_dec_and_test(&namespace->count
))
22 __put_namespace(namespace);
25 static inline void exit_namespace(struct task_struct
*p
)
27 struct namespace *namespace = p
->namespace;
32 put_namespace(namespace);
36 static inline void get_namespace(struct namespace *namespace)
38 atomic_inc(&namespace->count
);