From: Kamalesh Babulal Date: Wed, 12 Apr 2023 14:49:45 +0000 (+0530) Subject: Revert "api: cgroup v2 – enable controller at the leaf node" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4d3b1d442b08c3367912d959fe4107e790c6cc2;p=thirdparty%2Flibcgroup.git Revert "api: cgroup v2 – enable controller at the leaf node" This reverts commit bb291add5db87fe36a82a18c6eb6aaf64dc07694. cgroup v2, has no internal process constraint, where the process runs only on the leaf node of the cgroup hierarchy and no controllers should be enabled on the leaf cgroup node too, so that they don't compete with the parent's internal process. This patch broke this rule by enabling the controller on the leaf node by default. Let's revert to the original approach of not enabling the controller on the leaf cgroup node. Signed-by-off: Kamalesh Babulal Signed-off-by: Tom Hromatka (cherry picked from commit 9479fedff122ea44c887efafde2aaa3a51f0c623) --- diff --git a/src/api.c b/src/api.c index ccee6317..8a2ccd3c 100644 --- a/src/api.c +++ b/src/api.c @@ -2847,12 +2847,6 @@ static int _cgroup_create_cgroup(const struct cgroup * const cgroup, goto err; if (controller) { - if (version == CGROUP_V2) { - error = cgroupv2_subtree_control(base, controller->name, true); - if (error) - goto err; - } - error = cgroup_set_values_recursive(base, controller, false); if (error) goto err;