diff options
author | Jeff Layton <jlayton@kernel.org> | 2023-07-05 15:01:08 -0400 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-07-24 10:29:58 +0200 |
commit | c62ebd3501cc2c78d4cc28a9b4cbdb17d199c6d6 (patch) | |
tree | f8a4c2a8455e4ddb62ef0677053bd2892655b852 /fs/f2fs/f2fs.h | |
parent | 1bc33893e79a79df93d44fbd25080dbf59410e87 (diff) | |
download | linux-c62ebd3501cc2c78d4cc28a9b4cbdb17d199c6d6.tar.gz linux-c62ebd3501cc2c78d4cc28a9b4cbdb17d199c6d6.tar.bz2 linux-c62ebd3501cc2c78d4cc28a9b4cbdb17d199c6d6.zip |
f2fs: 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-41-jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index c7cb2177b252..e18272ae3119 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -3303,9 +3303,11 @@ static inline void clear_file(struct inode *inode, int type) static inline bool f2fs_is_time_consistent(struct inode *inode) { + struct timespec64 ctime = inode_get_ctime(inode); + if (!timespec64_equal(F2FS_I(inode)->i_disk_time, &inode->i_atime)) return false; - if (!timespec64_equal(F2FS_I(inode)->i_disk_time + 1, &inode->i_ctime)) + if (!timespec64_equal(F2FS_I(inode)->i_disk_time + 1, &ctime)) return false; if (!timespec64_equal(F2FS_I(inode)->i_disk_time + 2, &inode->i_mtime)) return false; |