libmount: Fix atime remount for new API
authorKarel Zak <kzak@redhat.com>
Tue, 14 May 2024 09:58:20 +0000 (11:58 +0200)
committerChris Hofstaedtler <zeha@debian.org>
Mon, 3 Jun 2024 15:03:37 +0000 (17:03 +0200)
commitea4de9b80c6fb6bbe02cab50964dadae984ac240
tree562119f7b37edbde4bba938563fa0c7253a154d0
parentca24b0613bae3b2cf9f8b23a4f96dec78ef44342
libmount: Fix atime remount for new API

All atime settings are mutually exclusive, and the attr_set mask for
the mount_setattr() syscall cannot contain multiple MOUNT_ATTR_ atime
related options.

Unfortunately, during a remount, the list of options is composed of
both old and new options. In this case, libmount sets more atime
options to the mask. The correct behavior is to use the last atime
related option from the list.

Fixes: https://github.com/util-linux/util-linux/issues/3032
Signed-off-by: Karel Zak <kzak@redhat.com>
Gbp-Pq: Topic upstream-master
Gbp-Pq: Name libmount-Fix-atime-remount-for-new-API.patch
libmount/src/optlist.c