Skip to content

Commit

Permalink
core/service: drop unneeded unit_add_to_gc_queue() (systemd#36368)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwata authored Feb 14, 2025
2 parents ebcd568 + 818315a commit daae625
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions src/core/service.c
Original file line number Diff line number Diff line change
Expand Up @@ -2152,10 +2152,6 @@ static void service_enter_dead(Service *s, ServiceResult f, bool allow_restart)
(void) unit_set_debug_invocation(UNIT(s), false);
}

/* The new state is in effect, let's decrease the fd store ref counter again. Let's also re-add us to the GC
* queue, so that the fd store is possibly gc'ed again */
unit_add_to_gc_queue(UNIT(s));

/* The next restart might not be a manual stop, hence reset the flag indicating manual stops */
s->forbid_restart = false;

Expand Down
2 changes: 1 addition & 1 deletion src/core/unit.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ void unit_release_resources(Unit *u) {
return;

state = unit_active_state(u);
if (!IN_SET(state, UNIT_INACTIVE, UNIT_FAILED))
if (!UNIT_IS_INACTIVE_OR_FAILED(state))
return;

if (unit_will_restart(u))
Expand Down

0 comments on commit daae625

Please sign in to comment.