summaryrefslogtreecommitdiffstats
path: root/fs/ntfs3/frecord.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2023-07-05 15:01:26 -0400
committerChristian Brauner <brauner@kernel.org>2023-07-24 10:30:02 +0200
commit3d65c46fbf6ad0e097f8ec0bc6c7674cce119fa2 (patch)
treea4c160085e4b45a59642851aa74cd593dcec1e03 /fs/ntfs3/frecord.c
parent03870d277fea0efb33d5de792194589130c6a3cb (diff)
downloadlinux-3d65c46fbf6ad0e097f8ec0bc6c7674cce119fa2.tar.gz
linux-3d65c46fbf6ad0e097f8ec0bc6c7674cce119fa2.tar.bz2
linux-3d65c46fbf6ad0e097f8ec0bc6c7674cce119fa2.zip
ntfs3: 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-59-jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/ntfs3/frecord.c')
-rw-r--r--fs/ntfs3/frecord.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c
index 16bd9faa2d28..2b85cb10f0be 100644
--- a/fs/ntfs3/frecord.c
+++ b/fs/ntfs3/frecord.c
@@ -3265,6 +3265,7 @@ int ni_write_inode(struct inode *inode, int sync, const char *hint)
if (is_rec_inuse(ni->mi.mrec) &&
!(sbi->flags & NTFS_FLAGS_LOG_REPLAYING) && inode->i_nlink) {
bool modified = false;
+ struct timespec64 ctime = inode_get_ctime(inode);
/* Update times in standard attribute. */
std = ni_std(ni);
@@ -3280,7 +3281,7 @@ int ni_write_inode(struct inode *inode, int sync, const char *hint)
modified = true;
}
- dup.c_time = kernel2nt(&inode->i_ctime);
+ dup.c_time = kernel2nt(&ctime);
if (std->c_time != dup.c_time) {
std->c_time = dup.c_time;
modified = true;