]> Git Repo - linux.git/commitdiff
xfs: sync up xfs_trans_inode with userspace
authorEric Sandeen <[email protected]>
Fri, 12 Jul 2019 22:07:05 +0000 (15:07 -0700)
committerDarrick J. Wong <[email protected]>
Mon, 15 Jul 2019 15:10:34 +0000 (08:10 -0700)
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]>
fs/xfs/libxfs/xfs_trans_inode.c

index 93d14e47269d1f1cbc18906de9edbb6ab18dadd4..a9ad90926b873fc6ba602cf13460ea175c0bef6c 100644 (file)
@@ -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;
+       }
 }
 
 /*
This page took 0.055741 seconds and 4 git commands to generate.