]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/cgroup: unit_realize_cgroup_now_disable() is NOP for non-slice units
authorMike Yuan <me@yhndnzj.com>
Sat, 5 Jul 2025 23:24:29 +0000 (01:24 +0200)
committerMike Yuan <me@yhndnzj.com>
Mon, 7 Jul 2025 15:55:14 +0000 (17:55 +0200)
src/core/cgroup.c

index bd47671a22d7bbe7064c3e3b802d09e83879b3b9..e343a659adeade6bc628ac7c2d49aafe9fc750d9 100644 (file)
@@ -2473,8 +2473,7 @@ static int unit_realize_cgroup_now_disable(Unit *u, ManagerState state) {
                         continue;
 
                 /* We must disable those below us first in order to release the controller. */
-                if (m->type == UNIT_SLICE)
-                        (void) unit_realize_cgroup_now_disable(m, state);
+                (void) unit_realize_cgroup_now_disable(m, state);
 
                 target_mask = unit_get_target_mask(m);
                 enable_mask = unit_get_enable_mask(m);