aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/utsname.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/utsname.c')
-rw-r--r--kernel/utsname.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/kernel/utsname.c b/kernel/utsname.c
index 1917f74be8ec..20697befe466 100644
--- a/kernel/utsname.c
+++ b/kernel/utsname.c
@@ -93,7 +93,7 @@ static inline struct uts_namespace *to_uts_ns(struct ns_common *ns)
93 return container_of(ns, struct uts_namespace, ns); 93 return container_of(ns, struct uts_namespace, ns);
94} 94}
95 95
96static void *utsns_get(struct task_struct *task) 96static struct ns_common *utsns_get(struct task_struct *task)
97{ 97{
98 struct uts_namespace *ns = NULL; 98 struct uts_namespace *ns = NULL;
99 struct nsproxy *nsproxy; 99 struct nsproxy *nsproxy;
@@ -109,12 +109,12 @@ static void *utsns_get(struct task_struct *task)
109 return ns ? &ns->ns : NULL; 109 return ns ? &ns->ns : NULL;
110} 110}
111 111
112static void utsns_put(void *ns) 112static void utsns_put(struct ns_common *ns)
113{ 113{
114 put_uts_ns(to_uts_ns(ns)); 114 put_uts_ns(to_uts_ns(ns));
115} 115}
116 116
117static int utsns_install(struct nsproxy *nsproxy, void *new) 117static int utsns_install(struct nsproxy *nsproxy, struct ns_common *new)
118{ 118{
119 struct uts_namespace *ns = to_uts_ns(new); 119 struct uts_namespace *ns = to_uts_ns(new);
120 120
@@ -128,16 +128,10 @@ static int utsns_install(struct nsproxy *nsproxy, void *new)
128 return 0; 128 return 0;
129} 129}
130 130
131static unsigned int utsns_inum(void *vp)
132{
133 return ((struct ns_common *)vp)->inum;
134}
135
136const struct proc_ns_operations utsns_operations = { 131const struct proc_ns_operations utsns_operations = {
137 .name = "uts", 132 .name = "uts",
138 .type = CLONE_NEWUTS, 133 .type = CLONE_NEWUTS,
139 .get = utsns_get, 134 .get = utsns_get,
140 .put = utsns_put, 135 .put = utsns_put,
141 .install = utsns_install, 136 .install = utsns_install,
142 .inum = utsns_inum,
143}; 137};