X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fnamespace.h;h=d137009f0b2be0feb70efcffba537f899195865d;hb=6b39bb6548d60b9a18826134b5ccd5c3cef85fe2;hp=6731977c4c13a00e39a251a12d7be31311960062;hpb=c7c6e9494cc9a4a5b1a2ca870ed4531ad2b98a83;p=linux-2.6 diff --git a/include/linux/namespace.h b/include/linux/namespace.h index 6731977c4c..d137009f0b 100644 --- a/include/linux/namespace.h +++ b/include/linux/namespace.h @@ -4,6 +4,7 @@ #include #include +#include struct namespace { atomic_t count; @@ -15,6 +16,7 @@ struct namespace { 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) { @@ -25,11 +27,8 @@ static inline void put_namespace(struct namespace *namespace) static inline void exit_namespace(struct task_struct *p) { - struct namespace *namespace = p->namespace; + struct namespace *namespace = p->nsproxy->namespace; if (namespace) { - task_lock(p); - p->namespace = NULL; - task_unlock(p); put_namespace(namespace); } }