libmount: Fix atime remount for new API
authorKarel Zak <kzak@redhat.com>
Tue, 14 May 2024 09:58:20 +0000 (11:58 +0200)
committerPeter Michael Green <plugwash@raspbian.org>
Tue, 3 Sep 2024 14:00:47 +0000 (14:00 +0000)
commite67c6583e06bb00976b8fdf82f9953a1a265101a
tree9815d25a9e0959327101ffe4e5fef85627db3d05
parentd2359161f4061964e9e6819886f91592699280d1
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