ns: move ns type into struct ns_common

It's misplaced in struct proc_ns_operations and ns->ops might be NULL if
the namespace is compiled out but we still want to know the type of the
namespace for the initial namespace struct.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Christian Brauner
2025-09-24 13:33:59 +02:00
parent 10cdfcd37a
commit 4055526d35
19 changed files with 51 additions and 34 deletions

View File

@@ -8,6 +8,7 @@
#include <linux/utsname.h>
struct uts_namespace init_uts_ns = {
.ns.ns_type = ns_common_type(&init_uts_ns),
.ns.__ns_ref = REFCOUNT_INIT(2),
.name = {
.sysname = UTS_SYSNAME,