core/cgroup: check CGroupRuntime.cgroup_path rather than _realized for freezer

The same check is used everywhere else.
This commit is contained in:
Mike Yuan
2024-06-28 15:38:42 +02:00
parent 8153be97c4
commit c97c79aded
+1 -1
View 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;