aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/utsname.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-11-01 00:37:32 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-12-04 14:34:17 -0500
commit64964528b24ea390824f0e5ce9d34b8d39b28cde (patch)
tree2de66d75468ad4ddecc7e175f86f1dbaae47ea9a /kernel/utsname.c
parent3c0411846118a578de3a979faf2da3ab5fb81179 (diff)
make proc_ns_operations work with struct ns_common * instead of void *
We can do that now. And kill ->inum(), while we are at it - all instances are identical. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
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};