1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-12 08:58:20 +03:00

core/job: shortening

Follow-up for a7a7163df7fc8a9f794f6803b2f6c9c9b0745a1f.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2018-05-19 11:39:57 +02:00 committed by Yu Watanabe
parent 0297f67e7a
commit 509ad7897c

View File

@ -915,11 +915,10 @@ int job_finish_and_invalidate(Job *j, JobResult result, bool recursive, bool alr
j->manager->n_failed_jobs++;
job_uninstall(j);
/* Remember jobs started before the reload */
if (MANAGER_IS_RELOADING(j->manager) && j->reloaded) {
if (job_save_pending_finished_job(j) < 0)
job_free(j);
} else
/* Keep jobs started before the reload to send singal later, free all others */
if (!MANAGER_IS_RELOADING(j->manager) ||
!j->reloaded ||
job_save_pending_finished_job(j) < 0)
job_free(j);
/* Fail depending jobs on failure */