ns: simplify ns_common_init() further

Simply derive the ns operations from the namespace type.

Acked-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Christian Brauner
2025-09-22 14:42:36 +02:00
parent 8535bd38b4
commit d7610cb745
9 changed files with 34 additions and 19 deletions

View File

@@ -103,7 +103,7 @@ static struct pid_namespace *create_pid_namespace(struct user_namespace *user_ns
if (ns->pid_cachep == NULL)
goto out_free_idr;
err = ns_common_init(ns, &pidns_operations);
err = ns_common_init(ns);
if (err)
goto out_free_idr;