HomeFreeBSD

Linux 6.7 compat: zfs_setattr fix atime update

Description

Linux 6.7 compat: zfs_setattr fix atime update

In db4fc559c I messed up and changed this bit of code to set the inode
atime to an uninitialised value, when actually it was just supposed to
loading the atime from the inode to be stored in the SA. This changes it
to what it should have been.

Ensure times change by the right amount Previously, we only checked
if the times changed at all, which missed a bug where the atime was
being set to an undefined value.

Now ensure the times change by two seconds (or thereabouts), ensuring
we catch cases where we set the time to something bonkers

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Sponsored-by: https://despairlabs.com/sponsor/
Closes #15762
Closes #15773
(cherry picked from commit 2ecc2dfe42707d8569e30f3b6a4526a0a825d479)

Details

Provenance
rob.norris_klarasystems.comAuthored on Jan 16 2024, 10:01 PM
Tony Hutter <hutter2@llnl.gov>Committed on Feb 8 2024, 9:29 PM
Parents
rGa9dc1166b6b9: Linux 6.5 compat: check BLK_OPEN_EXCL is defined
Branches
Unknown
Tags
Unknown