]> 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>
Mon, 5 Jun 2023 10:59:41 +0000 (12:59 +0200)
commit71b01d2a3760f36a1e81d422237f661fd07a72ad
tree72d81d097372e8a3f49795b81598191860624143
parent90b12595bbe3357fdbccf5eec6c3885e53bc614e
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