Blame SOURCES/0700-core-mount-setup-handle-non-existing-mountpoints-gra.patch

17b0f1
From 110af4eeadeec6e901d1189ed914d04fb8b60e13 Mon Sep 17 00:00:00 2001
17b0f1
From: Daniel Mack <daniel@zonque.org>
17b0f1
Date: Tue, 7 Apr 2015 00:44:15 +0200
17b0f1
Subject: [PATCH] core: mount-setup: handle non-existing mountpoints gracefully
17b0f1
17b0f1
Commit e792e890f ("path-util: don't eat up ENOENT in
17b0f1
path_is_mount_point()") changed path_is_mount_point() so it doesn't hide
17b0f1
-ENOENT from its caller. This causes all boots to fail early in case
17b0f1
any of the mount points does not exist (for instance, when kdbus isn't
17b0f1
loaded, /sys/fs/kdbus is missing).
17b0f1
17b0f1
Fix this by returning 0 from mount_one() if path_is_mount_point()
17b0f1
returned -ENOENT.
17b0f1
17b0f1
(cherry picked from commit b604cb9bf6a14d12589e85b82f3f59db93ea0029)
17b0f1
17b0f1
Resolves: #1585411
17b0f1
---
17b0f1
 src/core/mount-setup.c | 3 +++
17b0f1
 1 file changed, 3 insertions(+)
17b0f1
17b0f1
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
17b0f1
index ed493cbe36..71f07b6e2c 100644
17b0f1
--- a/src/core/mount-setup.c
17b0f1
+++ b/src/core/mount-setup.c
17b0f1
@@ -163,6 +163,9 @@ static int mount_one(const MountPoint *p, bool relabel) {
17b0f1
                 label_fix(p->where, true, true);
17b0f1
 
17b0f1
         r = path_is_mount_point(p->where, true);
17b0f1
+        if (r == -ENOENT)
17b0f1
+                return 0;
17b0f1
+
17b0f1
         if (r < 0)
17b0f1
                 return r;
17b0f1