core/mount: set Mount.from_proc_self_mountinfo flag before adding default dependencies
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 13 May 2022 03:30:04 +0000 (12:30 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 4 Aug 2022 16:35:38 +0000 (01:35 +0900)
commitb9e6d23dfc93b0eab8762c6fbe4fddc9eeb0c04f
tree8f4c713696db3da01ca1c772c953696f14dbd877
parent03e52e8cc3f4bca180afe7a4a2d2b2f585c70235
core/mount: set Mount.from_proc_self_mountinfo flag before adding default dependencies

When the function mount_setup_new_unit() is called, the corresponding
.mount unit file is not loaded. Hence, Mount.from_fragment is false.
To add default dependencies to e.g. .device units, it is necessary that
the Mount.from_proc_self_mountinfo flag is set. However, the flag was
not set even the unit has information from /proc/self/mountinfo.

Partially fixes #19983.
src/core/mount.c