summaryrefslogtreecommitdiffstats
path: root/fs/hfs/sysdep.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2023-10-04 20:52:26 +0200
committerChristian Brauner <brauner@kernel.org>2023-10-18 14:08:21 +0200
commitb5c6b1ea0ce8e318a6486ca484a0d667fbb320be (patch)
tree668076ee38b9434d9f17b3205e69205e0ee96ab1 /fs/hfs/sysdep.c
parentgfs2: convert to new timestamp accessors (diff)
downloadlinux-b5c6b1ea0ce8e318a6486ca484a0d667fbb320be.tar.xz
linux-b5c6b1ea0ce8e318a6486ca484a0d667fbb320be.zip
hfs: convert to new timestamp accessors
Convert to using the new inode timestamp accessor functions. Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://lore.kernel.org/r/20231004185347.80880-39-jlayton@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/hfs/sysdep.c')
-rw-r--r--fs/hfs/sysdep.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/hfs/sysdep.c b/fs/hfs/sysdep.c
index dc27d418fbcd..76fa02e3835b 100644
--- a/fs/hfs/sysdep.c
+++ b/fs/hfs/sysdep.c
@@ -28,11 +28,13 @@ static int hfs_revalidate_dentry(struct dentry *dentry, unsigned int flags)
/* fix up inode on a timezone change */
diff = sys_tz.tz_minuteswest * 60 - HFS_I(inode)->tz_secondswest;
if (diff) {
- struct timespec64 ctime = inode_get_ctime(inode);
+ struct timespec64 ts = inode_get_ctime(inode);
- inode_set_ctime(inode, ctime.tv_sec + diff, ctime.tv_nsec);
- inode->i_atime.tv_sec += diff;
- inode->i_mtime.tv_sec += diff;
+ inode_set_ctime(inode, ts.tv_sec + diff, ts.tv_nsec);
+ ts = inode_get_atime(inode);
+ inode_set_atime(inode, ts.tv_sec + diff, ts.tv_nsec);
+ ts = inode_get_mtime(inode);
+ inode_set_mtime(inode, ts.tv_sec + diff, ts.tv_nsec);
HFS_I(inode)->tz_secondswest += diff;
}
return 1;