core: on each iteration processing /proc/self/mountinfo merge all discovery flags...
authorLennart Poettering <lennart@poettering.net>
Tue, 14 Jan 2020 15:25:45 +0000 (16:25 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 15 Jan 2020 16:42:12 +0000 (17:42 +0100)
commit4bb68f2fee91090011a3d76ade72f8856eaaa2ec
tree494b72ebabb27e300d5f4f3e221aaf3caa058bca
parentdd1b23a3131a39b97948282dd963dd61af2f27dd
core: on each iteration processing /proc/self/mountinfo merge all discovery flags for each path

This extends on d253a45e1c147f5174265d71d7419da7bd52a88b, and instead of
merging just a single flag from previous mount entries of
/proc/self/mountinfo for the same path we merge all three.

This shouldn't change behaviour, but I think make things more readable.

Previously we'd set MOUNT_PROC_IS_MOUNTED unconditionally, we still do.

Previously we'd inherit MOUNT_PROC_JUST_MOUNTED from a previous entry on
the same line, we still do.

MOUNT_PROC_JUST_CHANGED should generally stay set too. Why that? If we
have two mount entries on the same mount point we'd first process one
and then the other, and the almost certainly different mount parameters
of the two would mean we'd set MOUNT_PROC_JUST_CHANGED for the second.
And with this we'll definitely do that still.

This also adds a comment explaining the situation a bit, and why we get
into this situation.
src/core/mount.c