diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-01 00:37:32 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-12-04 14:34:17 -0500 |
commit | 64964528b24ea390824f0e5ce9d34b8d39b28cde (patch) | |
tree | 2de66d75468ad4ddecc7e175f86f1dbaae47ea9a /kernel/pid_namespace.c | |
parent | 3c0411846118a578de3a979faf2da3ab5fb81179 (diff) | |
download | lwn-64964528b24ea390824f0e5ce9d34b8d39b28cde.tar.gz lwn-64964528b24ea390824f0e5ce9d34b8d39b28cde.zip |
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/pid_namespace.c')
-rw-r--r-- | kernel/pid_namespace.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c index dd961ad86fbd..79aabce49a85 100644 --- a/kernel/pid_namespace.c +++ b/kernel/pid_namespace.c @@ -318,7 +318,7 @@ static inline struct pid_namespace *to_pid_ns(struct ns_common *ns) return container_of(ns, struct pid_namespace, ns); } -static void *pidns_get(struct task_struct *task) +static struct ns_common *pidns_get(struct task_struct *task) { struct pid_namespace *ns; @@ -331,12 +331,12 @@ static void *pidns_get(struct task_struct *task) return ns ? &ns->ns : NULL; } -static void pidns_put(void *ns) +static void pidns_put(struct ns_common *ns) { put_pid_ns(to_pid_ns(ns)); } -static int pidns_install(struct nsproxy *nsproxy, void *ns) +static int pidns_install(struct nsproxy *nsproxy, struct ns_common *ns) { struct pid_namespace *active = task_active_pid_ns(current); struct pid_namespace *ancestor, *new = to_pid_ns(ns); @@ -367,18 +367,12 @@ static int pidns_install(struct nsproxy *nsproxy, void *ns) return 0; } -static unsigned int pidns_inum(void *ns) -{ - return ((struct ns_common *)ns)->inum; -} - const struct proc_ns_operations pidns_operations = { .name = "pid", .type = CLONE_NEWPID, .get = pidns_get, .put = pidns_put, .install = pidns_install, - .inum = pidns_inum, }; static __init int pid_namespaces_init(void) |