Skip to content

Commit 659f90f

Browse files
Werkovhtejun
authored andcommitted
cgroup/cpuset: Expose cpuset filesystem with cpuset v1 only
The cpuset filesystem is a legacy interface to cpuset controller with (pre-)v1 features. It makes little sense to co-mount it on systems without cpuset v1, so do not build it when cpuset v1 is not built neither. Signed-off-by: Michal Koutný <[email protected]> Reviewed-by: Waiman Long <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent 8c7e22f commit 659f90f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/cgroup/cgroup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2331,7 +2331,7 @@ static struct file_system_type cgroup2_fs_type = {
23312331
.fs_flags = FS_USERNS_MOUNT,
23322332
};
23332333

2334-
#ifdef CONFIG_CPUSETS
2334+
#ifdef CONFIG_CPUSETS_V1
23352335
static const struct fs_context_operations cpuset_fs_context_ops = {
23362336
.get_tree = cgroup1_get_tree,
23372337
.free = cgroup_fs_context_free,
@@ -6236,7 +6236,7 @@ int __init cgroup_init(void)
62366236
WARN_ON(register_filesystem(&cgroup_fs_type));
62376237
WARN_ON(register_filesystem(&cgroup2_fs_type));
62386238
WARN_ON(!proc_create_single("cgroups", 0, NULL, proc_cgroupstats_show));
6239-
#ifdef CONFIG_CPUSETS
6239+
#ifdef CONFIG_CPUSETS_V1
62406240
WARN_ON(register_filesystem(&cpuset_fs_type));
62416241
#endif
62426242

0 commit comments

Comments
 (0)