mirror of https://github.com/torvalds/linux.git
ipc: use ns_common_init()
Don't cargo-cult the same thing over and over. Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
0b40774ef0
commit
90d4d9f4d2
|
|
@ -61,12 +61,10 @@ static struct ipc_namespace *create_ipc_ns(struct user_namespace *user_ns,
|
|||
if (ns == NULL)
|
||||
goto fail_dec;
|
||||
|
||||
err = ns_alloc_inum(&ns->ns);
|
||||
err = ns_common_init(&ns->ns, &ipcns_operations, true);
|
||||
if (err)
|
||||
goto fail_free;
|
||||
ns->ns.ops = &ipcns_operations;
|
||||
|
||||
refcount_set(&ns->ns.count, 1);
|
||||
ns->user_ns = get_user_ns(user_ns);
|
||||
ns->ucounts = ucounts;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue