From: Mike Yuan Date: Sat, 15 Nov 2025 20:08:50 +0000 (+0100) Subject: core/unit: always propagate reload_result as job result, even if state is unexpected X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2334953a498e919d5301222bd3f74dbfcb2b8cf8;p=thirdparty%2Fsystemd.git core/unit: always propagate reload_result as job result, even if state is unexpected The end state of unit shouldn't have any impact on reload job, as either way the reload operation has been aborted. --- diff --git a/src/core/unit.c b/src/core/unit.c index 7675082e229..8a406a93341 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -2649,9 +2649,7 @@ static bool unit_process_job(Job *j, UnitActiveState ns, bool reload_success) { job_finish_and_invalidate(j, reload_success ? JOB_DONE : JOB_FAILED, true, false); else if (!IN_SET(ns, UNIT_ACTIVATING, UNIT_RELOADING, UNIT_REFRESHING)) { unexpected = true; - - if (UNIT_IS_INACTIVE_OR_FAILED(ns)) - job_finish_and_invalidate(j, ns == UNIT_FAILED ? JOB_FAILED : JOB_CANCELED, true, false); + job_finish_and_invalidate(j, reload_success ? JOB_CANCELED : JOB_FAILED, true, false); } }