mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 13:11:14 +00: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 <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
64964528b2
commit
6344c433a4
7 changed files with 16 additions and 13 deletions
|
@ -86,7 +86,7 @@ int create_user_ns(struct cred *new)
|
|||
if (!ns)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = proc_alloc_inum(&ns->ns.inum);
|
||||
ret = ns_alloc_inum(&ns->ns);
|
||||
if (ret) {
|
||||
kmem_cache_free(user_ns_cachep, ns);
|
||||
return ret;
|
||||
|
@ -136,7 +136,7 @@ void free_user_ns(struct user_namespace *ns)
|
|||
#ifdef CONFIG_PERSISTENT_KEYRINGS
|
||||
key_put(ns->persistent_keyring_register);
|
||||
#endif
|
||||
proc_free_inum(ns->ns.inum);
|
||||
ns_free_inum(&ns->ns);
|
||||
kmem_cache_free(user_ns_cachep, ns);
|
||||
ns = parent;
|
||||
} while (atomic_dec_and_test(&parent->count));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue