core/mount: add implicit unit dependencies even if when mount unit is generated from...
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 29 Aug 2021 12:20:43 +0000 (21:20 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 12 Oct 2021 16:01:56 +0000 (18:01 +0200)
Hopefully fixes #20566.

(cherry picked from commit aebff2e7ce209fc2d75b894a3ae8b80f6f36ec11)
(cherry picked from commit 1bb8af46d1181a407cbc858025b85392f3af7812)

src/core/mount.c

index dc272d9ab403c8f28ed3df03224c341b84b9fc28..fd8dfd91b14ce89a9f424da56f447684d49ec76d 100644 (file)
@@ -1553,6 +1553,10 @@ static int mount_setup_new_unit(
         if (r < 0)
                 return r;
 
+        r = mount_add_non_exec_dependencies(MOUNT(u));
+        if (r < 0)
+                return r;
+
         /* This unit was generated because /proc/self/mountinfo reported it. Remember this, so that by the time we load
          * the unit file for it (and thus add in extra deps right after) we know what source to attributes the deps
          * to.*/