]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
libxfs: set access time when creating files
authorDarrick J. Wong <djwong@kernel.org>
Tue, 9 Jan 2024 17:39:35 +0000 (09:39 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 10 Apr 2024 00:21:33 +0000 (17:21 -0700)
Set the access time on files that we're creating, to match the behavior
of the kernel.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
libxfs/inode.c

index 326c88a42aa0236d18e81feaab4579684cc4fb88..f3766b849fa9d8fc06c3aca55c32cd18adb75e8d 100644 (file)
@@ -91,7 +91,8 @@ libxfs_icreate(
        struct xfs_inode        *pip = args->pip;
        struct xfs_inode        *ip;
        unsigned int            flags;
-       int                     times = XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG;
+       int                     times = XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG |
+                                       XFS_ICHGTIME_ACCESS;
        int                     error;
 
        error = libxfs_iget(tp->t_mountp, tp, ino, XFS_IGET_CREATE, &ip);