diff options
author | Jeff Layton <jlayton@kernel.org> | 2023-07-05 22:01:37 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-07-24 11:30:04 +0300 |
commit | ae834901ecc517cd943e172cb30b65fb79407b98 (patch) | |
tree | fedb506ff8b41732de9e136172e02a5e2211569e /fs/reiserfs/xattr.c | |
parent | 9f590685bc5aa7a8f6c1a9ff47bf4755546b1c2b (diff) | |
download | linux-ae834901ecc517cd943e172cb30b65fb79407b98.tar.xz |
reiserfs: 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-70-jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/reiserfs/xattr.c')
-rw-r--r-- | fs/reiserfs/xattr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 651027967159..6000964c2b80 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c @@ -466,12 +466,13 @@ int reiserfs_commit_write(struct file *f, struct page *page, static void update_ctime(struct inode *inode) { struct timespec64 now = current_time(inode); + struct timespec64 ctime = inode_get_ctime(inode); if (inode_unhashed(inode) || !inode->i_nlink || - timespec64_equal(&inode->i_ctime, &now)) + timespec64_equal(&ctime, &now)) return; - inode->i_ctime = current_time(inode); + inode_set_ctime_to_ts(inode, now); mark_inode_dirty(inode); } |