core/slice: make slice_freezer_action() return 0 if freezing state is unchanged

Fixes #23278.
This commit is contained in:
Yu Watanabe
2022-05-06 14:01:22 +09:00
parent 37b7eef35d
commit d171e72e7a
2 changed files with 3 additions and 5 deletions

View File

@@ -389,11 +389,7 @@ static int slice_freezer_action(Unit *s, FreezerAction action) {
return r;
}
r = unit_cgroup_freezer_action(s, action);
if (r < 0)
return r;
return 1;
return unit_cgroup_freezer_action(s, action);
}
static int slice_freeze(Unit *s) {

View File

@@ -5849,6 +5849,8 @@ static int unit_freezer_action(Unit *u, FreezerAction action) {
if (r <= 0)
return r;
assert(IN_SET(u->freezer_state, FREEZER_FREEZING, FREEZER_THAWING));
return 1;
}