|
|
be0c12 |
From c236734f95550747c4979fe318e3a890adaa0a94 Mon Sep 17 00:00:00 2001
|
|
|
be0c12 |
From: Lennart Poettering <lennart@poettering.net>
|
|
|
be0c12 |
Date: Wed, 28 Nov 2018 12:41:44 +0100
|
|
|
be0c12 |
Subject: [PATCH] mount: don't propagate errors from mount_setup_unit() further
|
|
|
be0c12 |
up
|
|
|
be0c12 |
|
|
|
be0c12 |
If we can't process a specific line in /proc/self/mountinfo we should
|
|
|
be0c12 |
log about it (which we do), but this should not affect other lines, nor
|
|
|
be0c12 |
further processing of mount units. Let's keep these failures local.
|
|
|
be0c12 |
|
|
|
be0c12 |
Fixes: #10874
|
|
|
be0c12 |
|
|
|
be0c12 |
Cherry picked from commit ba0d56f55f2073164799be714b5bd1aad94d059a.
|
|
|
be0c12 |
Trivial conflict in src/core/mount.c, function mount_load_proc_self_mountinfo,
|
|
|
be0c12 |
due to local commit ca634baa10e. Also, due to the same commit, int k
|
|
|
be0c12 |
is no longer used and is thus removed.
|
|
|
be0c12 |
|
|
|
be0c12 |
Resolves: #2036853
|
|
|
be0c12 |
|
|
|
be0c12 |
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
|
|
|
be0c12 |
---
|
|
|
be0c12 |
src/core/mount.c | 8 ++------
|
|
|
be0c12 |
1 file changed, 2 insertions(+), 6 deletions(-)
|
|
|
be0c12 |
|
|
|
be0c12 |
diff --git a/src/core/mount.c b/src/core/mount.c
|
|
|
be0c12 |
index 691b23ca74..4e0a4f238a 100644
|
|
|
be0c12 |
--- a/src/core/mount.c
|
|
|
be0c12 |
+++ b/src/core/mount.c
|
|
|
be0c12 |
@@ -1615,12 +1615,10 @@ static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) {
|
|
|
be0c12 |
if (r < 0)
|
|
|
be0c12 |
return log_error_errno(r, "Failed to parse /proc/self/mountinfo: %m");
|
|
|
be0c12 |
|
|
|
be0c12 |
- r = 0;
|
|
|
be0c12 |
for (;;) {
|
|
|
be0c12 |
struct libmnt_fs *fs;
|
|
|
be0c12 |
const char *device, *path, *options, *fstype;
|
|
|
be0c12 |
_cleanup_free_ char *d = NULL, *p = NULL;
|
|
|
be0c12 |
- int k;
|
|
|
be0c12 |
|
|
|
be0c12 |
r = mnt_table_next_fs(table, iter, &fs);
|
|
|
be0c12 |
if (r == 1)
|
|
|
be0c12 |
@@ -1644,12 +1642,10 @@ static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) {
|
|
|
be0c12 |
|
|
|
be0c12 |
device_found_node(m, d, DEVICE_FOUND_MOUNT, DEVICE_FOUND_MOUNT);
|
|
|
be0c12 |
|
|
|
be0c12 |
- k = mount_setup_unit(m, d, p, options, fstype, set_flags);
|
|
|
be0c12 |
- if (r == 0 && k < 0)
|
|
|
be0c12 |
- r = k;
|
|
|
be0c12 |
+ (void) mount_setup_unit(m, d, p, options, fstype, set_flags);
|
|
|
be0c12 |
}
|
|
|
be0c12 |
|
|
|
be0c12 |
- return r;
|
|
|
be0c12 |
+ return 0;
|
|
|
be0c12 |
}
|
|
|
be0c12 |
|
|
|
be0c12 |
static void mount_shutdown(Manager *m) {
|