valeriyvdovin / rpms / systemd

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