core/mount: make mount_setup_existing_unit() not drop MOUNT_PROC_JUST_MOUNTED flag from units

This fixes a bug introduced by ec88d1ea05.

Fixes #11362.
This commit is contained in:
Yu Watanabe 2019-01-09 03:35:55 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent 82d9ac23fd
commit d253a45e1c

View 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