diff options
| author | Christian Brauner <brauner@kernel.org> | 2025-09-24 13:33:59 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-09-25 09:23:54 +0200 |
| commit | 4055526d35746ce8b04bfa5e14e14f28bb163186 (patch) | |
| tree | 9d42503429528822e4cc7c2a38f2fd4bbcf10d4c /kernel/cgroup | |
| parent | 10cdfcd37ade7ce736bc4a1927680f390a6b1f7b (diff) | |
| download | linux-4055526d35746ce8b04bfa5e14e14f28bb163186.tar.gz linux-4055526d35746ce8b04bfa5e14e14f28bb163186.tar.bz2 linux-4055526d35746ce8b04bfa5e14e14f28bb163186.zip | |
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>
Diffstat (limited to 'kernel/cgroup')
| -rw-r--r-- | kernel/cgroup/cgroup.c | 1 | ||||
| -rw-r--r-- | kernel/cgroup/namespace.c | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index 245b43ff2fa4..9b75102e81cb 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -224,6 +224,7 @@ struct cgroup_namespace init_cgroup_ns = { .ns.ops = &cgroupns_operations, .ns.inum = ns_init_inum(&init_cgroup_ns), .root_cset = &init_css_set, + .ns.ns_type = ns_common_type(&init_cgroup_ns), }; static struct file_system_type cgroup2_fs_type; diff --git a/kernel/cgroup/namespace.c b/kernel/cgroup/namespace.c index 04c98338ac08..241ca05f07c8 100644 --- a/kernel/cgroup/namespace.c +++ b/kernel/cgroup/namespace.c @@ -137,7 +137,6 @@ static struct user_namespace *cgroupns_owner(struct ns_common *ns) const struct proc_ns_operations cgroupns_operations = { .name = "cgroup", - .type = CLONE_NEWCGROUP, .get = cgroupns_get, .put = cgroupns_put, .install = cgroupns_install, |
