diff options
author | Jeff Layton <jlayton@kernel.org> | 2023-07-05 15:01:13 -0400 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-07-24 10:29:59 +0200 |
commit | 7305586a79284f86ee003ab0c03c31b59f87ebbb (patch) | |
tree | 403f5b10caa8be8e5b226aa9b7509e8c02071da9 /fs/hfs/sysdep.c | |
parent | 8a8b8d91b1582f03b934dc3b9781f7ced4d27202 (diff) |
hfs: convert to ctime accessor functions
In later patches, we're going to change how the inode's ctime field is
used. Switch to using accessor functions instead of raw accesses of
inode->i_ctime.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Message-Id: <20230705190309.579783-46-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 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/hfs/sysdep.c b/fs/hfs/sysdep.c index 2875961fdc10..dc27d418fbcd 100644 --- a/fs/hfs/sysdep.c +++ b/fs/hfs/sysdep.c @@ -28,7 +28,9 @@ 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) { - inode->i_ctime.tv_sec += diff; + struct timespec64 ctime = 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; HFS_I(inode)->tz_secondswest += diff; |