]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/job: never consider reload jobs redundant
authorMike Yuan <me@yhndnzj.com>
Wed, 22 Jan 2025 18:36:27 +0000 (19:36 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 22 Jan 2025 22:51:46 +0000 (22:51 +0000)
Follow-up for 656bbffc6c45bdd8d5c28a96ca948ba16c546547

The commit reworked job merging logic so that reload jobs
won't get merged. However, they might get dropped from
transaction due to being deemed redundant, i.e. way before
it even hits job_install(). Let's make sure reload jobs
are always kept during transaction construction stage, too.

src/core/job.c

index 8fbbe757feb31d4fa0d55e78073f8ca2f91d8a90..c6c736cc6f86a52aaae960820326b66a09dade4d 100644 (file)
@@ -448,9 +448,8 @@ bool job_type_is_redundant(JobType a, UnitActiveState b) {
                 return IN_SET(b, UNIT_ACTIVE, UNIT_RELOADING, UNIT_REFRESHING);
 
         case JOB_RELOAD:
-                return
-                        b == UNIT_RELOADING;
-
+                /* Reload jobs are never consider redundant/duplicate. Refer jobs_may_late_merge() for
+                 * a detailed justification. */
         case JOB_RESTART:
                 /* Restart jobs must always be kept.
                  *