]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: always try to reload not-found unit
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 31 Aug 2020 18:44:00 +0000 (20:44 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 1 Sep 2020 15:27:28 +0000 (17:27 +0200)
This check was added in d904afc730268d50502f764dfd55b8cf4906c46f. It would only
apply in the case where the cache hasn't been loaded yet. I think we pretty
much always have the cache loaded when we reach this point, but even if we
didn't, it seems better to try to reload the unit. So let's drop this check.

(cherry picked from commit 02103e57162946b5ac620c552123ff5e305a2791)

src/core/manager.c

index 1a70634cb9cede1d4529284d71d268f28f7924a6..43e7b10f2c53fa2c6df04223a232f44cd0c7ad2f 100644 (file)
@@ -1946,9 +1946,6 @@ bool manager_unit_cache_should_retry_load(Unit *u) {
         if (u->load_state != UNIT_NOT_FOUND)
                 return false;
 
-        if (u->manager->unit_cache_mtime == 0)
-                return false;
-
         /* The cache has been updated since the last time we tried to load the unit. There might be new
          * fragment paths to read. */
         if (u->manager->unit_cache_mtime != u->fragment_not_found_time)