Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / include / linux / namespace.h
index 8728b30..4e234d8 100644 (file)
@@ -9,17 +9,19 @@ 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 *);
+extern void umount_unused(struct vfsmount *, 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);
 }