diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-07-02 11:22:35 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-07-02 11:36:56 -0700 |
commit | 3d1dfb6df9b7b9ffc95499b9ddd92d949e5a60d2 (patch) | |
tree | facd51c83bb98cbad3d49ed4c5e6355536e48692 /fs/xfs/libxfs/xfs_trans_inode.c | |
parent | ba4b39fe4c011078469dcd28f51447d75852d21c (diff) |
xfs: implement atime updates in xfs_trans_ichgtime
Enable xfs_trans_ichgtime to change the inode access time so that we can
use this function to set inode times when allocating inodes instead of
open-coding it.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_trans_inode.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_trans_inode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_trans_inode.c b/fs/xfs/libxfs/xfs_trans_inode.c index 69fc5b981352..3c40f37e82c7 100644 --- a/fs/xfs/libxfs/xfs_trans_inode.c +++ b/fs/xfs/libxfs/xfs_trans_inode.c @@ -68,6 +68,8 @@ xfs_trans_ichgtime( inode_set_mtime_to_ts(inode, tv); if (flags & XFS_ICHGTIME_CHG) inode_set_ctime_to_ts(inode, tv); + if (flags & XFS_ICHGTIME_ACCESS) + inode_set_atime_to_ts(inode, tv); if (flags & XFS_ICHGTIME_CREATE) ip->i_crtime = tv; } |