]> git.ipfire.org Git - thirdparty/systemd.git/commit
Revert "mount: check right before invoking /bin/umount if it makes sense"
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 10 Aug 2023 02:26:43 +0000 (11:26 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 14 Aug 2023 04:39:15 +0000 (13:39 +0900)
commite323d2e463270ef556aeb753455bdf01a22af46d
treeee2d576f4604e741493ad563e10cb026ee2c88c6
parent3912d49d0da2aefaf92148096ea527b98d4c0a37
Revert "mount: check right before invoking /bin/umount if it makes sense"

This reverts commit 1483892a421ca34bc841a8e8b1f385744c0407ed.

As the commit says, it does not solve the race. Moreover, it introduces
an regression #28410.

Also, checking by `path_is_mount_point()` may trigger automount. From
statx(2),
> AT_NO_AUTOMOUNT
>     Don't automount the terminal ("basename") component of pathname
>     if it is a directory that is an automount point.
Similar statements can be found in fstatat(2), which is used in the
fallback call for statx() in glibc, and name_to_handle_at(2), which is
used as the fallback when statx() failed.
So, `path_is_mount_point()` may _do_ trigger automount for parent paths.
That should be avoided especially on shutdown.

The original issue #25527 that is 'fixed' by the commit is not serious,
and should be fixed by making umount command handle path gracefully:
https://github.com/util-linux/util-linux/issues/2132

Fixes #28410.
src/basic/unit-def.c
src/basic/unit-def.h
src/core/mount.c