From: Yu Watanabe Date: Tue, 8 Jan 2019 18:35:55 +0000 (+0900) Subject: core/mount: make mount_setup_existing_unit() not drop MOUNT_PROC_JUST_MOUNTED flag... X-Git-Tag: archive/raspbian/240-6+rpi1^2~46 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b4c655b882adc01a2c7cd25bc59c913550ea5d5a;p=systemd.git core/mount: make mount_setup_existing_unit() not drop MOUNT_PROC_JUST_MOUNTED flag from units 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 --- diff --git a/src/core/mount.c b/src/core/mount.c index ead9bc1f..4c5a0294 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -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