squashfs: convert to ctime accessor functions
authorJeff Layton <jlayton@kernel.org>
Wed, 5 Jul 2023 19:01:40 +0000 (15:01 -0400)
committerChristian Brauner <brauner@kernel.org>
Mon, 24 Jul 2023 08:30:05 +0000 (10:30 +0200)
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-73-jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/squashfs/inode.c

index 2446314..c6e626b 100644 (file)
@@ -61,7 +61,7 @@ static int squashfs_new_inode(struct super_block *sb, struct inode *inode,
        inode->i_ino = le32_to_cpu(sqsh_ino->inode_number);
        inode->i_mtime.tv_sec = le32_to_cpu(sqsh_ino->mtime);
        inode->i_atime.tv_sec = inode->i_mtime.tv_sec;
-       inode->i_ctime.tv_sec = inode->i_mtime.tv_sec;
+       inode_set_ctime(inode, inode->i_mtime.tv_sec, 0);
        inode->i_mode = le16_to_cpu(sqsh_ino->mode);
        inode->i_size = 0;