]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/cgroup: check CGroupRuntime.cgroup_path rather than _realized for freezer
authorMike Yuan <me@yhndnzj.com>
Wed, 5 Jun 2024 17:23:40 +0000 (19:23 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 29 Jul 2025 11:08:03 +0000 (13:08 +0200)
The same check is used everywhere else.

(cherry picked from commit c97c79aded8d313237e0952062a2cce71fb88eb5)

src/core/cgroup.c

index 33dfee96f9f7a08fdaa5961a136693fbbe5d08d4..55bdec2acc92ce267b5fbc168554f11d3d2b1f51 100644 (file)
@@ -5136,7 +5136,7 @@ int unit_cgroup_freezer_action(Unit *u, FreezerAction action) {
         unit_next_freezer_state(u, action, &next, &target);
 
         CGroupRuntime *crt = unit_get_cgroup_runtime(u);
-        if (!crt || !crt->cgroup_realized) {
+        if (!crt || !crt->cgroup_path) {
                 /* No realized cgroup = nothing to freeze */
                 u->freezer_state = freezer_state_finish(next);
                 return 0;