Blame SOURCES/0235-path-stop-watching-path-specs-once-we-triggered-the-.patch

ddca0b
From 55d9d6dfb731d2f1c8c940fb8a7ea0af6c498c4c Mon Sep 17 00:00:00 2001
ddca0b
From: Michal Sekletar <msekleta@redhat.com>
ddca0b
Date: Mon, 9 Sep 2019 14:38:35 +0200
ddca0b
Subject: [PATCH] path: stop watching path specs once we triggered the target
ddca0b
 unit
ddca0b
ddca0b
We start watching them again once we get a notification that triggered
ddca0b
unit entered inactive or failed state.
ddca0b
ddca0b
Fixes: #10503
ddca0b
(cherry picked from commit 8fca6944c2ee20c63d62154c8badddc77170b176)
ddca0b
ddca0b
Resolves: #1763161
ddca0b
---
ddca0b
 src/core/path.c | 6 ++----
ddca0b
 1 file changed, 2 insertions(+), 4 deletions(-)
ddca0b
ddca0b
diff --git a/src/core/path.c b/src/core/path.c
ddca0b
index 68b13b610a..5ef178a46b 100644
ddca0b
--- a/src/core/path.c
ddca0b
+++ b/src/core/path.c
ddca0b
@@ -478,11 +478,9 @@ static void path_enter_running(Path *p) {
ddca0b
 
ddca0b
         p->inotify_triggered = false;
ddca0b
 
ddca0b
-        r = path_watch(p);
ddca0b
-        if (r < 0)
ddca0b
-                goto fail;
ddca0b
-
ddca0b
         path_set_state(p, PATH_RUNNING);
ddca0b
+        path_unwatch(p);
ddca0b
+
ddca0b
         return;
ddca0b
 
ddca0b
 fail: