]> 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)
committerMike Yuan <me@yhndnzj.com>
Fri, 28 Jun 2024 13:38:42 +0000 (15:38 +0200)
The same check is used everywhere else.

src/core/cgroup.c

index bb78ded3eb29936ae57c22727d58c16aabfa8baf..9296a5e4acbd6893989c5177b882ecfdc450a1f0 100644 (file)
@@ -5134,7 +5134,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;