diff options
author | Jeff Layton <jlayton@kernel.org> | 2023-10-04 20:52:26 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-10-18 14:08:21 +0200 |
commit | b5c6b1ea0ce8e318a6486ca484a0d667fbb320be (patch) | |
tree | 668076ee38b9434d9f17b3205e69205e0ee96ab1 /fs/hfs/sysdep.c | |
parent | gfs2: convert to new timestamp accessors (diff) | |
download | linux-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.c | 10 |
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; |