summaryrefslogtreecommitdiff
path: root/ipc
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 /ipc
parent3c0411846118a578de3a979faf2da3ab5fb81179 (diff)
downloadlinux-rt-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 'ipc')
-rw-r--r--ipc/namespace.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/ipc/namespace.c b/ipc/namespace.c
index 3c1e8d3bd7d3..531029a67fef 100644
--- a/ipc/namespace.c
+++ b/ipc/namespace.c
@@ -154,7 +154,7 @@ static inline struct ipc_namespace *to_ipc_ns(struct ns_common *ns)
return container_of(ns, struct ipc_namespace, ns);
}
-static void *ipcns_get(struct task_struct *task)
+static struct ns_common *ipcns_get(struct task_struct *task)
{
struct ipc_namespace *ns = NULL;
struct nsproxy *nsproxy;
@@ -168,12 +168,12 @@ static void *ipcns_get(struct task_struct *task)
return ns ? &ns->ns : NULL;
}
-static void ipcns_put(void *ns)
+static void ipcns_put(struct ns_common *ns)
{
return put_ipc_ns(to_ipc_ns(ns));
}
-static int ipcns_install(struct nsproxy *nsproxy, void *new)
+static int ipcns_install(struct nsproxy *nsproxy, struct ns_common *new)
{
struct ipc_namespace *ns = to_ipc_ns(new);
if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN) ||
@@ -187,16 +187,10 @@ static int ipcns_install(struct nsproxy *nsproxy, void *new)
return 0;
}
-static unsigned int ipcns_inum(void *vp)
-{
- return ((struct ns_common *)vp)->inum;
-}
-
const struct proc_ns_operations ipcns_operations = {
.name = "ipc",
.type = CLONE_NEWIPC,
.get = ipcns_get,
.put = ipcns_put,
.install = ipcns_install,
- .inum = ipcns_inum,
};