libmount: Fix atime remount for new API
authorKarel Zak <kzak@redhat.com>
Tue, 14 May 2024 09:58:20 +0000 (11:58 +0200)
committerHelmut Grohne <helmut@subdivi.de>
Wed, 5 Jun 2024 15:23:00 +0000 (17:23 +0200)
commit658a7e8a64cd2a99d28a5681435d8faecf4082a3
treefb76ad24a1df3b8ee9f937e32e7f06018266faab
parente27664951ba79ac9a15406f0b9fcf2e93e7f036d
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