X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fnamespace.h;h=3abc8e3b4879a5eac2dd54374f0fb9b37ca9f3a7;hb=34a75f0025b9cf803b6a88db032e6ad6950c9313;hp=8728b3030c4726c5723f0ea3d3f448f836ea542e;hpb=9bf4aaab3e101692164d49b7ca357651eb691cb6;p=linux-2.6.git diff --git a/include/linux/namespace.h b/include/linux/namespace.h index 8728b3030..3abc8e3b4 100644 --- a/include/linux/namespace.h +++ b/include/linux/namespace.h @@ -9,17 +9,18 @@ struct namespace { atomic_t count; struct vfsmount * root; struct list_head list; - struct rw_semaphore sem; + wait_queue_head_t poll; + int event; }; -extern void umount_tree(struct vfsmount *); -extern void umount_unused(struct vfsmount *, struct fs_struct *); extern int copy_namespace(int, struct task_struct *); extern void __put_namespace(struct namespace *namespace); +extern struct namespace *dup_namespace(struct task_struct *, struct fs_struct *); static inline void put_namespace(struct namespace *namespace) { - if (atomic_dec_and_test(&namespace->count)) + if (atomic_dec_and_lock(&namespace->count, &vfsmount_lock)) + /* releases vfsmount_lock */ __put_namespace(namespace); }