5 #include <linux/mount.h>
6 #include <linux/sched.h>
10 struct vfsmount * root;
11 struct list_head list;
12 wait_queue_head_t poll;
16 extern int copy_namespace(int, struct task_struct *);
17 extern void __put_namespace(struct namespace *namespace);
18 extern struct namespace *dup_namespace(struct task_struct *, struct fs_struct *);
19 extern void umount_unused(struct vfsmount *, struct fs_struct *);
21 static inline void put_namespace(struct namespace *namespace)
23 if (atomic_dec_and_lock(&namespace->count, &vfsmount_lock))
24 /* releases vfsmount_lock */
25 __put_namespace(namespace);
28 static inline void exit_namespace(struct task_struct *p)
30 struct namespace *namespace = p->namespace;
35 put_namespace(namespace);
39 static inline void get_namespace(struct namespace *namespace)
41 atomic_inc(&namespace->count);