File 0001-core-coldplug-possible-nop_job.patch of Package systemd.15230

From a37edcfa2314e523afe34e4441a9e2b76b81439b Mon Sep 17 00:00:00 2001
From: ypf791 <ypf791@gmail.com>
Date: Fri, 19 Jul 2019 18:28:04 +0800
Subject: [PATCH] core: coldplug possible nop_job

(cherry picked from commit b49e14d5f3081dfcd363d8199a14c0924ae9152f)

[fbui: fixes bsc#1139459]
---
 src/core/unit.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/core/unit.c b/src/core/unit.c
index 5fc14563e6..1ba3b43bb1 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2959,6 +2959,7 @@ int unit_add_node_link(Unit *u, const char *what, bool wants, UnitDependency dep
 
 int unit_coldplug(Unit *u) {
         int r = 0, q = 0;
+        Job *uj;
 
         assert(u);
 
@@ -2972,8 +2973,9 @@ int unit_coldplug(Unit *u) {
         if (UNIT_VTABLE(u)->coldplug)
                 r = UNIT_VTABLE(u)->coldplug(u);
 
-        if (u->job)
-                q = job_coldplug(u->job);
+        uj = u->job ?: u->nop_job;
+        if (uj)
+                q = job_coldplug(uj);
 
         if (r < 0)
                 return r;
-- 
2.16.4

openSUSE Build Service is sponsored by