richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
4eda52
From ea4ebf86d25fb9c489d1cf1ca42371b7e2e782aa Mon Sep 17 00:00:00 2001
4eda52
From: Yu Watanabe <watanabe.yu+github@gmail.com>
4eda52
Date: Sun, 29 Aug 2021 21:20:43 +0900
4eda52
Subject: [PATCH] core/mount: add implicit unit dependencies even if when mount
4eda52
 unit is generated from /proc/self/mountinfo
4eda52
4eda52
Hopefully fixes #20566.
4eda52
4eda52
(cherry picked from commit aebff2e7ce209fc2d75b894a3ae8b80f6f36ec11)
4eda52
4eda52
Resolves: #2019468
4eda52
---
4eda52
 src/core/mount.c | 4 ++++
4eda52
 1 file changed, 4 insertions(+)
4eda52
4eda52
diff --git a/src/core/mount.c b/src/core/mount.c
4eda52
index 1fd3102ad3..f2c85e0e5d 100644
4eda52
--- a/src/core/mount.c
4eda52
+++ b/src/core/mount.c
4eda52
@@ -1582,6 +1582,10 @@ static int mount_setup_new_unit(
4eda52
         if (r < 0)
4eda52
                 return r;
4eda52
 
4eda52
+        r = mount_add_non_exec_dependencies(MOUNT(u));
4eda52
+        if (r < 0)
4eda52
+                return r;
4eda52
+
4eda52
         /* This unit was generated because /proc/self/mountinfo reported it. Remember this, so that by the time we load
4eda52
          * the unit file for it (and thus add in extra deps right after) we know what source to attributes the deps
4eda52
          * to. */