summaryrefslogtreecommitdiffstats
path: root/kernel/user_namespace.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/user_namespace.c
parent3c0411846118a578de3a979faf2da3ab5fb81179 (diff)
downloadop-kernel-dev-64964528b24ea390824f0e5ce9d34b8d39b28cde.zip
op-kernel-dev-64964528b24ea390824f0e5ce9d34b8d39b28cde.tar.gz
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/user_namespace.c')
-rw-r--r--kernel/user_namespace.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index 1ab2209..29cd5cc 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -846,7 +846,7 @@ static inline struct user_namespace *to_user_ns(struct ns_common *ns)
return container_of(ns, struct user_namespace, ns);
}
-static void *userns_get(struct task_struct *task)
+static struct ns_common *userns_get(struct task_struct *task)
{
struct user_namespace *user_ns;
@@ -857,12 +857,12 @@ static void *userns_get(struct task_struct *task)
return user_ns ? &user_ns->ns : NULL;
}
-static void userns_put(void *ns)
+static void userns_put(struct ns_common *ns)
{
put_user_ns(to_user_ns(ns));
}
-static int userns_install(struct nsproxy *nsproxy, void *ns)
+static int userns_install(struct nsproxy *nsproxy, struct ns_common *ns)
{
struct user_namespace *user_ns = to_user_ns(ns);
struct cred *cred;
@@ -893,18 +893,12 @@ static int userns_install(struct nsproxy *nsproxy, void *ns)
return commit_creds(cred);
}
-static unsigned int userns_inum(void *ns)
-{
- return ((struct ns_common *)ns)->inum;
-}
-
const struct proc_ns_operations userns_operations = {
.name = "user",
.type = CLONE_NEWUSER,
.get = userns_get,
.put = userns_put,
.install = userns_install,
- .inum = userns_inum,
};
static __init int user_namespaces_init(void)
OpenPOWER on IntegriCloud