a19bc6
From 32efad544d53f7c1745eb36eef0df95ef96d1c15 Mon Sep 17 00:00:00 2001
a19bc6
From: Harald Hoyer <harald@redhat.com>
a19bc6
Date: Tue, 9 Jun 2015 10:32:28 +0200
a19bc6
Subject: [PATCH] util:bind_remount_recursive(): handle return 0 of
a19bc6
 set_consume()
a19bc6
a19bc6
set_consume() does not return -EEXIST, but 0, in case the key is already
a19bc6
in the Set.
a19bc6
a19bc6
Cherry-picked from: 85d834ae8e7d9e2c28ef8c1388e2913ed8fd0e3b
a19bc6
Resolves: #1433687
a19bc6
---
a19bc6
 src/shared/util.c | 2 +-
a19bc6
 1 file changed, 1 insertion(+), 1 deletion(-)
a19bc6
a19bc6
diff --git a/src/shared/util.c b/src/shared/util.c
c62b8e
index 3e13cc1fdb..cadaddee32 100644
a19bc6
--- a/src/shared/util.c
a19bc6
+++ b/src/shared/util.c
a19bc6
@@ -7327,7 +7327,7 @@ int bind_remount_recursive(const char *prefix, bool ro) {
a19bc6
                 while ((x = set_steal_first(todo))) {
a19bc6
 
a19bc6
                         r = set_consume(done, x);
a19bc6
-                        if (r == -EEXIST)
a19bc6
+                        if (r == -EEXIST || r == 0)
a19bc6
                                 continue;
a19bc6
                         if (r < 0)
a19bc6
                                 return r;