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>
Sat, 6 Jul 2024 13:57:30 +0000 (15:57 +0200)
commit19b3a560bd9574d763de38068c84cc9cec1d6665
tree01c54797d318bfedd04b75e37079ee2e5d5cd7ca
parentd915191aff7cb95f3e531e6bc56fb479ba7db911
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