5 #include <linux/mount.h>
6 #include <linux/sched.h>
10 struct vfsmount * root;
11 struct list_head list;
12 struct rw_semaphore sem;
13 wait_queue_head_t poll;
17 extern int copy_namespace(int, struct task_struct *);
18 extern void __put_namespace(struct namespace *namespace);
20 static inline void put_namespace(struct namespace *namespace)
22 if (atomic_dec_and_lock(&namespace->count, &vfsmount_lock))
23 /* releases vfsmount_lock */
24 __put_namespace(namespace);
27 static inline void exit_namespace(struct task_struct *p)
29 struct namespace *namespace = p->namespace;
34 put_namespace(namespace);
38 static inline void get_namespace(struct namespace *namespace)
40 atomic_inc(&namespace->count);