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>
Wed, 14 Aug 2024 10:29:34 +0000 (12:29 +0200)
commitd9b448dd6dc9a09a9ed3600fe074e8542b43fd18
treed8c15d77631e92bb99974e920ff72cecc4665580
parent258e7dff5256bd72e87485cefcc3d893a30a1494
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