aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sandeen <[email protected]>2019-07-12 15:07:05 -0700
committerDarrick J. Wong <[email protected]>2019-07-15 08:10:34 -0700
commit79ba2a2185432e8ea40e35eb261f10076d205ea3 (patch)
tree193cbb7b592ebd0e1ac2984d42c547dd131c52d4
parent3f6d70e88555d2513b0199c0c383602bf8aec059 (diff)
xfs: sync up xfs_trans_inode with userspace
Add an XFS_ICHGTIME_CREATE case to xfs_trans_ichgtime() to keep in sync with userspace. (Currently no kernel caller sends this flag.) Signed-off-by: Eric Sandeen <[email protected]> Reviewed-by: Brian Foster <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
-rw-r--r--fs/xfs/libxfs/xfs_trans_inode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_trans_inode.c b/fs/xfs/libxfs/xfs_trans_inode.c
index 93d14e47269d..a9ad90926b87 100644
--- a/fs/xfs/libxfs/xfs_trans_inode.c
+++ b/fs/xfs/libxfs/xfs_trans_inode.c
@@ -66,6 +66,10 @@ xfs_trans_ichgtime(
inode->i_mtime = tv;
if (flags & XFS_ICHGTIME_CHG)
inode->i_ctime = tv;
+ if (flags & XFS_ICHGTIME_CREATE) {
+ ip->i_d.di_crtime.t_sec = (int32_t)tv.tv_sec;
+ ip->i_d.di_crtime.t_nsec = (int32_t)tv.tv_nsec;
+ }
}
/*