diff mbox series

[2/4] cgroup/cpuset: Expose cpuset filesystem with cpuset v1 only

Message ID 20240909163223.3693529-3-mkoutny@suse.com (mailing list archive)
State New
Headers show
Series Followups to controllers' v1 compilation | expand

Commit Message

Michal Koutný Sept. 9, 2024, 4:32 p.m. UTC
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 no build it when cpuset v1 is not built
neither.

Signed-off-by: Michal Koutný <mkoutny@suse.com>
---
 kernel/cgroup/cgroup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Waiman Long Sept. 9, 2024, 5:07 p.m. UTC | #1
On 9/9/24 12:32, Michal Koutný wrote:
> 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 no build it when cpuset v1 is not built
> neither.
>
> Signed-off-by: Michal Koutný <mkoutny@suse.com>
> ---
>   kernel/cgroup/cgroup.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
> index c72e18ffbfd82..90e50d6d3cf39 100644
> --- a/kernel/cgroup/cgroup.c
> +++ b/kernel/cgroup/cgroup.c
> @@ -2331,7 +2331,7 @@ static struct file_system_type cgroup2_fs_type = {
>   	.fs_flags		= FS_USERNS_MOUNT,
>   };
>   
> -#ifdef CONFIG_CPUSETS
> +#ifdef CONFIG_CPUSETS_V1
>   static const struct fs_context_operations cpuset_fs_context_ops = {
>   	.get_tree	= cgroup1_get_tree,
>   	.free		= cgroup_fs_context_free,
> @@ -6236,7 +6236,7 @@ int __init cgroup_init(void)
>   	WARN_ON(register_filesystem(&cgroup_fs_type));
>   	WARN_ON(register_filesystem(&cgroup2_fs_type));
>   	WARN_ON(!proc_create_single("cgroups", 0, NULL, proc_cgroupstats_show));
> -#ifdef CONFIG_CPUSETS
> +#ifdef CONFIG_CPUSETS_V1
>   	WARN_ON(register_filesystem(&cpuset_fs_type));
>   #endif
>   
Reviewed-by: Waiman Long <longman@redhat.com>
Tejun Heo Sept. 10, 2024, 8:02 p.m. UTC | #2
On Mon, Sep 09, 2024 at 06:32:21PM +0200, Michal Koutný wrote:
> 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 no build it when cpuset v1 is not built
> neither.
> 
> Signed-off-by: Michal Koutný <mkoutny@suse.com>

Applied to cgroup/for-6.12 w/ a typo fix and Waiman's reviewed-by added.

Thanks.
diff mbox series

Patch

diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index c72e18ffbfd82..90e50d6d3cf39 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -2331,7 +2331,7 @@  static struct file_system_type cgroup2_fs_type = {
 	.fs_flags		= FS_USERNS_MOUNT,
 };
 
-#ifdef CONFIG_CPUSETS
+#ifdef CONFIG_CPUSETS_V1
 static const struct fs_context_operations cpuset_fs_context_ops = {
 	.get_tree	= cgroup1_get_tree,
 	.free		= cgroup_fs_context_free,
@@ -6236,7 +6236,7 @@  int __init cgroup_init(void)
 	WARN_ON(register_filesystem(&cgroup_fs_type));
 	WARN_ON(register_filesystem(&cgroup2_fs_type));
 	WARN_ON(!proc_create_single("cgroups", 0, NULL, proc_cgroupstats_show));
-#ifdef CONFIG_CPUSETS
+#ifdef CONFIG_CPUSETS_V1
 	WARN_ON(register_filesystem(&cpuset_fs_type));
 #endif