X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fnamespace.h;h=6731977c4c13a00e39a251a12d7be31311960062;hb=43cefe29d497c2a9d3c7eae89964260e7b35149e;hp=697991b69f9b6d09e7d18f087490e66b018a78d1;hpb=7ca6448dbfb398bba36eda3c01bc14b86c3675be;p=linux-2.6 diff --git a/include/linux/namespace.h b/include/linux/namespace.h index 697991b69f..6731977c4c 100644 --- a/include/linux/namespace.h +++ b/include/linux/namespace.h @@ -9,7 +9,8 @@ struct namespace { atomic_t count; struct vfsmount * root; struct list_head list; - struct rw_semaphore sem; + wait_queue_head_t poll; + int event; }; extern int copy_namespace(int, struct task_struct *); @@ -17,7 +18,8 @@ extern void __put_namespace(struct namespace *namespace); 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); }