Blame SOURCES/02-Fix-sbd-inquisitor-Do-not-create-duplicate-servants.patch

f46b0e
From 35b4f310dedd95c5e24b1473b73de194a3fe3f3e Mon Sep 17 00:00:00 2001
f46b0e
From: "Gao,Yan" <ygao@suse.com>
f46b0e
Date: Thu, 1 Jun 2017 14:26:10 +0200
f46b0e
Subject: [PATCH] Fix: sbd-inquisitor: Do not create duplicate servants
f46b0e
f46b0e
---
f46b0e
 src/sbd-inquisitor.c | 5 +++++
f46b0e
 1 file changed, 5 insertions(+)
f46b0e
f46b0e
diff --git a/src/sbd-inquisitor.c b/src/sbd-inquisitor.c
f46b0e
index cd7d914..b82e6e8 100644
f46b0e
--- a/src/sbd-inquisitor.c
f46b0e
+++ b/src/sbd-inquisitor.c
f46b0e
@@ -50,6 +50,11 @@ void recruit_servant(const char *devname, pid_t pid)
f46b0e
 	struct servants_list_item *s = servants_leader;
f46b0e
 	struct servants_list_item *newbie;
f46b0e
 
f46b0e
+	if (lookup_servant_by_dev(devname)) {
f46b0e
+		cl_log(LOG_DEBUG, "Servant %s already exists", devname);
f46b0e
+		return;
f46b0e
+	}
f46b0e
+
f46b0e
 	newbie = malloc(sizeof(*newbie));
f46b0e
 	if (!newbie) {
f46b0e
 		fprintf(stderr, "malloc failed in recruit_servant.\n");
f46b0e
-- 
f46b0e
1.8.3.1
f46b0e