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>
This commit is contained in:
parent
64964528b2
commit
6344c433a4
7 changed files with 16 additions and 13 deletions
|
@ -42,7 +42,7 @@ static struct uts_namespace *clone_uts_ns(struct user_namespace *user_ns,
|
|||
if (!ns)
|
||||
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);
|
||||
|
@ -84,7 +84,7 @@ void free_uts_ns(struct kref *kref)
|
|||
|
||||
ns = container_of(kref, struct uts_namespace, kref);
|
||||
put_user_ns(ns->user_ns);
|
||||
proc_free_inum(ns->ns.inum);
|
||||
ns_free_inum(&ns->ns);
|
||||
kfree(ns);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue