]> git.proxmox.com Git - mirror_zfs.git/commit
Linux 6.7 compat: zfs_setattr fix atime update
authorRob N <robn@despairlabs.com>
Tue, 16 Jan 2024 22:01:17 +0000 (09:01 +1100)
committerGitHub <noreply@github.com>
Tue, 16 Jan 2024 22:01:17 +0000 (14:01 -0800)
commitf0bf7a247dbb030d68c7fd2b5526dd111cc775d0
tree0527a13f9a2d7f984a875a940ba6790f0071684c
parentef00da803de24f93fb02757f1a4295fe7f0016b9
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
module/os/linux/zfs/zfs_vnops_os.c
tests/zfs-tests/cmd/ctime.c