mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user