7 struct vfsmount * root;
9 struct rw_semaphore sem;
12 extern void umount_tree(struct vfsmount *);
14 static inline void put_namespace(struct namespace *namespace)
16 if (atomic_dec_and_test(&namespace->count)) {
17 down_write(&namespace->sem);
18 spin_lock(&dcache_lock);
19 umount_tree(namespace->root);
20 spin_unlock(&dcache_lock);
21 up_write(&namespace->sem);
26 static inline void exit_namespace(struct task_struct *p)
28 struct namespace *namespace = p->namespace;
33 put_namespace(namespace);
36 extern int copy_namespace(int, struct task_struct *);
38 static inline void get_namespace(struct namespace *namespace)
40 atomic_inc(&namespace->count);