mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]>
This commit is contained in:
parent
64964528b2
commit
6344c433a4
7 changed files with 16 additions and 13 deletions
|
|
@ -26,7 +26,7 @@ static struct ipc_namespace *create_ipc_ns(struct user_namespace *user_ns,
|
|||
if (ns == NULL)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
err = proc_alloc_inum(&ns->ns.inum);
|
||||
err = ns_alloc_inum(&ns->ns);
|
||||
if (err) {
|
||||
kfree(ns);
|
||||
return ERR_PTR(err);
|
||||
|
|
@ -35,7 +35,7 @@ static struct ipc_namespace *create_ipc_ns(struct user_namespace *user_ns,
|
|||
atomic_set(&ns->count, 1);
|
||||
err = mq_init_ns(ns);
|
||||
if (err) {
|
||||
proc_free_inum(ns->ns.inum);
|
||||
ns_free_inum(&ns->ns);
|
||||
kfree(ns);
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
|
|
@ -119,7 +119,7 @@ static void free_ipc_ns(struct ipc_namespace *ns)
|
|||
*/
|
||||
ipcns_notify(IPCNS_REMOVED);
|
||||
put_user_ns(ns->user_ns);
|
||||
proc_free_inum(ns->ns.inum);
|
||||
ns_free_inum(&ns->ns);
|
||||
kfree(ns);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue