]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: use mount(2) for remount on Linux < 5.14
authorKarel Zak <kzak@redhat.com>
Mon, 5 Jun 2023 10:59:41 +0000 (12:59 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 16 Aug 2023 07:15:39 +0000 (09:15 +0200)
commitf1875239b00c35d35e69edd4854349014f5d52b7
treebec02ba1efb397c0f099bb55f1e78c2a70e45b44
parent58cb00c63facc572ffb93aa756773c149ec11041
libmount: use mount(2) for remount on Linux < 5.14

It seems mount_setattr() is supported on Linux < 5.14, but it's without
MOUNT_ATTR_NOSYMFOLLOW. That's problem for remount where we reset all
VFS flags.

The most simple (but not elegant) is to check for kernel version and
fallback to mount(2) on remount.

Addresses: https://github.com/util-linux/util-linux/issues/2283
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/hook_mount.c