summaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorEric Sandeen2019-07-13 00:07:05 +0200
committerDarrick J. Wong2019-07-15 17:10:34 +0200
commit79ba2a2185432e8ea40e35eb261f10076d205ea3 (patch)
tree193cbb7b592ebd0e1ac2984d42c547dd131c52d4 /fs/xfs
parentxfs: move xfs_trans_inode.c to libxfs/ (diff)
downloadkernel-qcow2-linux-79ba2a2185432e8ea40e35eb261f10076d205ea3.tar.gz
kernel-qcow2-linux-79ba2a2185432e8ea40e35eb261f10076d205ea3.tar.xz
kernel-qcow2-linux-79ba2a2185432e8ea40e35eb261f10076d205ea3.zip
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 <sandeen@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs')
-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;
+ }
}
/*