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

Details

Provenance
rob.norris_klarasystems.comAuthored on Jan 16 2024, 10:01 PM
GitHub <noreply@github.com>Committed on Jan 16 2024, 10:01 PM
Parents
rGef00da803de2: Make sure all necessary RPM path macros are defined
Branches
Unknown
Tags
Unknown