]> git.ipfire.org Git - thirdparty/systemd.git/commit
fd-util: do not call statx() twice when it does not provide mount ID 28487/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 21 Jul 2023 16:31:16 +0000 (01:31 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 21 Jul 2023 17:22:06 +0000 (02:22 +0900)
commit68a4fc8b5386646302af5bf35ac9b22d13501b77
treeb55b884ae213336e6f546d88f05541e19603658e
parentbd96111d5fa8d3c05aad6aed21243d6b0534055d
fd-util: do not call statx() twice when it does not provide mount ID

Previously, in path_is_root_at(), if statx() does not provide mount ID,
path_get_mnt_id_at() was called, but it also calls statx(). Let's avoid
the second trial.
src/basic/fd-util.c
src/basic/mountpoint-util.c
src/basic/mountpoint-util.h