diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-01 00:45:45 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-12-04 14:34:36 -0500 |
| commit | 6344c433a452b1a05d03a61a6a85d89f793bb7b8 (patch) | |
| tree | d7fb4505dc394206c1b98bb02dfc58cce16dfe7c /ipc | |
| parent | 64964528b24ea390824f0e5ce9d34b8d39b28cde (diff) | |
new helpers: ns_alloc_inum/ns_free_inum
take struct ns_common *, for now simply wrappers around proc_{alloc,free}_inum()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'ipc')
| -rw-r--r-- | ipc/namespace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ipc/namespace.c b/ipc/namespace.c index 531029a67fef..bcdd7a5c122a 100644 --- a/ipc/namespace.c +++ b/ipc/namespace.c | |||
| @@ -26,7 +26,7 @@ static struct ipc_namespace *create_ipc_ns(struct user_namespace *user_ns, | |||
| 26 | if (ns == NULL) | 26 | if (ns == NULL) |
| 27 | return ERR_PTR(-ENOMEM); | 27 | return ERR_PTR(-ENOMEM); |
| 28 | 28 | ||
| 29 | err = proc_alloc_inum(&ns->ns.inum); | 29 | err = ns_alloc_inum(&ns->ns); |
| 30 | if (err) { | 30 | if (err) { |
| 31 | kfree(ns); | 31 | kfree(ns); |
| 32 | return ERR_PTR(err); | 32 | return ERR_PTR(err); |
| @@ -35,7 +35,7 @@ static struct ipc_namespace *create_ipc_ns(struct user_namespace *user_ns, | |||
| 35 | atomic_set(&ns->count, 1); | 35 | atomic_set(&ns->count, 1); |
| 36 | err = mq_init_ns(ns); | 36 | err = mq_init_ns(ns); |
| 37 | if (err) { | 37 | if (err) { |
| 38 | proc_free_inum(ns->ns.inum); | 38 | ns_free_inum(&ns->ns); |
| 39 | kfree(ns); | 39 | kfree(ns); |
| 40 | return ERR_PTR(err); | 40 | return ERR_PTR(err); |
| 41 | } | 41 | } |
| @@ -119,7 +119,7 @@ static void free_ipc_ns(struct ipc_namespace *ns) | |||
| 119 | */ | 119 | */ |
| 120 | ipcns_notify(IPCNS_REMOVED); | 120 | ipcns_notify(IPCNS_REMOVED); |
| 121 | put_user_ns(ns->user_ns); | 121 | put_user_ns(ns->user_ns); |
| 122 | proc_free_inum(ns->ns.inum); | 122 | ns_free_inum(&ns->ns); |
| 123 | kfree(ns); | 123 | kfree(ns); |
| 124 | } | 124 | } |
| 125 | 125 | ||
