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>
Tue, 1 Oct 2024 18:13:03 +0000 (20:13 +0200)
commit9b23957e6a2c2fd8f9ed0689e44a95b268c7e4ad
tree8e74d9928831b949a36f444c412281d653d43251
parent5da40fc06ad6be057e04cb5ad533916d517ab51b
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