1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-28 02:50:16 +03:00

core/service: drop unneeded unit_add_to_gc_queue() (#36368)

This commit is contained in:
Yu Watanabe 2025-02-14 12:51:48 +09:00 committed by GitHub
commit daae625140
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 5 deletions

View File

@ -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;

View File

@ -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))