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:
Christian Brauner 2025-09-12 13:52:32 +02:00
parent 0b40774ef0
commit 90d4d9f4d2
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2
1 changed files with 1 additions and 3 deletions

View File

@ -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;