ibm: convert to ctime accessor functions
authorJeff Layton <jlayton@kernel.org>
Wed, 5 Jul 2023 19:00:44 +0000 (15:00 -0400)
committerChristian Brauner <brauner@kernel.org>
Thu, 13 Jul 2023 08:28:02 +0000 (10:28 +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.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Message-Id: <20230705190309.579783-17-jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
drivers/misc/ibmasm/ibmasmfs.c
drivers/misc/ibmvmc.c

index 35fec1b..5867af9 100644 (file)
@@ -139,7 +139,7 @@ static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode)
        if (ret) {
                ret->i_ino = get_next_ino();
                ret->i_mode = mode;
-               ret->i_atime = ret->i_mtime = ret->i_ctime = current_time(ret);
+               ret->i_atime = ret->i_mtime = inode_set_ctime_current(ret);
        }
        return ret;
 }
index d7c7f03..2101eb1 100644 (file)
@@ -1124,7 +1124,7 @@ static ssize_t ibmvmc_write(struct file *file, const char *buffer,
                goto out;
 
        inode = file_inode(file);
-       inode->i_mtime = inode->i_ctime = current_time(inode);
+       inode->i_mtime = inode_set_ctime_current(inode);
        mark_inode_dirty(inode);
 
        dev_dbg(adapter->dev, "write: file = 0x%lx, count = 0x%lx\n",