[Devel] [PATCH vz10] cgroup-v2: Clarify ve0 cgroup handling in hidden_ss_mask

Konstantin Khorenko khorenko at virtuozzo.com
Fri Dec 12 16:52:22 MSK 2025


Add comment explaining that ve0 cgroup files remain shown if ve0 is
the root cgroup, as root cgroup is not created through cgroup_create().
This clarifies the behavior mentioned in the commit message.

https://virtuozzo.atlassian.net/browse/VSTOR-119803
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 kernel/cgroup/cgroup.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 4274097b65f9c..291dcbae79609 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -6452,6 +6452,10 @@ static struct cgroup *cgroup_create(struct cgroup *parent, const char *name,
 	if (!cgroup_on_dfl(cgrp))
 		cgrp->subtree_control = cgroup_control(cgrp);
 	else
+		/* Hide ve controller by default. Note that ve0 cgroup files
+		 * remain shown if ve0 is the root cgroup, as root cgroup is
+		 * not created through cgroup_create().
+		 */
 		cgrp->hidden_ss_mask = 1 << ve_cgrp_id;
 
 	cgroup_propagate_control(cgrp);
-- 
2.43.0



More information about the Devel mailing list