[PATCH] Discuss a couple common errors in kernel-doc usage.
[deliverable/linux.git] / include / linux / nsproxy.h
index 7bdebfaab6a5b18c4b9523f70efe3c7b7b1c37e6..0b9f0dc30d6114a1f5177a7fde829d2199137172 100644 (file)
@@ -4,6 +4,11 @@
 #include <linux/spinlock.h>
 #include <linux/sched.h>
 
+struct mnt_namespace;
+struct uts_namespace;
+struct ipc_namespace;
+struct pid_namespace;
+
 /*
  * A structure to contain pointers to all per-process
  * namespaces - fs (mount), uts, network, sysvipc, etc.
 struct nsproxy {
        atomic_t count;
        spinlock_t nslock;
+       struct uts_namespace *uts_ns;
+       struct ipc_namespace *ipc_ns;
+       struct mnt_namespace *mnt_ns;
+       struct pid_namespace *pid_ns;
 };
 extern struct nsproxy init_nsproxy;
 
@@ -38,8 +47,10 @@ static inline void exit_task_namespaces(struct task_struct *p)
 {
        struct nsproxy *ns = p->nsproxy;
        if (ns) {
-               put_nsproxy(ns);
+               task_lock(p);
                p->nsproxy = NULL;
+               task_unlock(p);
+               put_nsproxy(ns);
        }
 }
 #endif
This page took 0.026376 seconds and 5 git commands to generate.