aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/nsproxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/nsproxy.c')
-rw-r--r--kernel/nsproxy.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index 674aceb7335a..bd9cb435dfe0 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -17,7 +17,7 @@
17#include <linux/version.h> 17#include <linux/version.h>
18#include <linux/nsproxy.h> 18#include <linux/nsproxy.h>
19#include <linux/init_task.h> 19#include <linux/init_task.h>
20#include <linux/namespace.h> 20#include <linux/mnt_namespace.h>
21#include <linux/utsname.h> 21#include <linux/utsname.h>
22 22
23struct nsproxy init_nsproxy = INIT_NSPROXY(init_nsproxy); 23struct nsproxy init_nsproxy = INIT_NSPROXY(init_nsproxy);
@@ -60,8 +60,8 @@ struct nsproxy *dup_namespaces(struct nsproxy *orig)
60 struct nsproxy *ns = clone_namespaces(orig); 60 struct nsproxy *ns = clone_namespaces(orig);
61 61
62 if (ns) { 62 if (ns) {
63 if (ns->namespace) 63 if (ns->mnt_ns)
64 get_namespace(ns->namespace); 64 get_mnt_ns(ns->mnt_ns);
65 if (ns->uts_ns) 65 if (ns->uts_ns)
66 get_uts_ns(ns->uts_ns); 66 get_uts_ns(ns->uts_ns);
67 if (ns->ipc_ns) 67 if (ns->ipc_ns)
@@ -97,7 +97,7 @@ int copy_namespaces(int flags, struct task_struct *tsk)
97 97
98 tsk->nsproxy = new_ns; 98 tsk->nsproxy = new_ns;
99 99
100 err = copy_namespace(flags, tsk); 100 err = copy_mnt_ns(flags, tsk);
101 if (err) 101 if (err)
102 goto out_ns; 102 goto out_ns;
103 103
@@ -117,8 +117,8 @@ out_ipc:
117 if (new_ns->uts_ns) 117 if (new_ns->uts_ns)
118 put_uts_ns(new_ns->uts_ns); 118 put_uts_ns(new_ns->uts_ns);
119out_uts: 119out_uts:
120 if (new_ns->namespace) 120 if (new_ns->mnt_ns)
121 put_namespace(new_ns->namespace); 121 put_mnt_ns(new_ns->mnt_ns);
122out_ns: 122out_ns:
123 tsk->nsproxy = old_ns; 123 tsk->nsproxy = old_ns;
124 kfree(new_ns); 124 kfree(new_ns);
@@ -127,8 +127,8 @@ out_ns:
127 127
128void free_nsproxy(struct nsproxy *ns) 128void free_nsproxy(struct nsproxy *ns)
129{ 129{
130 if (ns->namespace) 130 if (ns->mnt_ns)
131 put_namespace(ns->namespace); 131 put_mnt_ns(ns->mnt_ns);
132 if (ns->uts_ns) 132 if (ns->uts_ns)
133 put_uts_ns(ns->uts_ns); 133 put_uts_ns(ns->uts_ns);
134 if (ns->ipc_ns) 134 if (ns->ipc_ns)