diff options
author | Jeff Layton <jlayton@kernel.org> | 2023-10-04 21:52:40 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-10-18 15:08:24 +0300 |
commit | 2be861fab2d9e8740f97d954520a32b743145971 (patch) | |
tree | a98fa34567cc8f83556f132aeb649b26604b9a50 /fs/ntfs3/frecord.c | |
parent | 56c0d99b846adeded1ce8fabf782d86a8a0b6eb7 (diff) | |
download | linux-2be861fab2d9e8740f97d954520a32b743145971.tar.xz |
ntfs3: convert to new timestamp accessors
Convert to using the new inode timestamp accessor functions.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://lore.kernel.org/r/20231004185347.80880-53-jlayton@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/ntfs3/frecord.c')
-rw-r--r-- | fs/ntfs3/frecord.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c index 2b85cb10f0be..9f66dcf5da8f 100644 --- a/fs/ntfs3/frecord.c +++ b/fs/ntfs3/frecord.c @@ -3265,7 +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); + struct timespec64 ts; /* Update times in standard attribute. */ std = ni_std(ni); @@ -3275,19 +3275,22 @@ int ni_write_inode(struct inode *inode, int sync, const char *hint) } /* Update the access times if they have changed. */ - dup.m_time = kernel2nt(&inode->i_mtime); + ts = inode_get_mtime(inode); + dup.m_time = kernel2nt(&ts); if (std->m_time != dup.m_time) { std->m_time = dup.m_time; modified = true; } - dup.c_time = kernel2nt(&ctime); + ts = inode_get_mtime(inode); + dup.c_time = kernel2nt(&ts); if (std->c_time != dup.c_time) { std->c_time = dup.c_time; modified = true; } - dup.a_time = kernel2nt(&inode->i_atime); + ts = inode_get_atime(inode); + dup.a_time = kernel2nt(&ts); if (std->a_time != dup.a_time) { std->a_time = dup.a_time; modified = true; |