core/mount: make mount_setup_existing_unit() not drop MOUNT_PROC_JUST_MOUNTED flag...
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 8 Jan 2019 18:35:55 +0000 (03:35 +0900)
committerMichael Biebl <biebl@debian.org>
Sat, 12 Jan 2019 20:49:44 +0000 (20:49 +0000)
This fixes a bug introduced by ec88d1ea0591beccab97d9096fd3fd7b09bc823c.

Fixes #11362.

(cherry picked from commit d253a45e1c147f5174265d71d7419da7bd52a88b)
(cherry picked from commit 27492fe33697c88b5452602604b0b28771bfd39f)

Gbp-Pq: Name core-mount-make-mount_setup_existing_unit-not-drop-MOUNT_.patch

src/core/mount.c

index ead9bc1f441564993b20c7e78c22327a904a71e4..4c5a02948c61a9bed1291d501dd168b0774bd8ad 100644 (file)
@@ -1528,10 +1528,10 @@ static int mount_setup_existing_unit(
         if (r > 0)
                 flags |= MOUNT_PROC_JUST_CHANGED;
 
-        if (!MOUNT(u)->from_proc_self_mountinfo) {
+        if (!MOUNT(u)->from_proc_self_mountinfo || FLAGS_SET(MOUNT(u)->proc_flags, MOUNT_PROC_JUST_MOUNTED))
                 flags |= MOUNT_PROC_JUST_MOUNTED;
-                MOUNT(u)->from_proc_self_mountinfo = true;
-        }
+
+        MOUNT(u)->from_proc_self_mountinfo = true;
 
         if (IN_SET(u->load_state, UNIT_NOT_FOUND, UNIT_BAD_SETTING, UNIT_ERROR)) {
                 /* The unit was previously not found or otherwise not loaded. Now that the unit shows up in