diff options
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r-- | fs/xfs/xfs_inode.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index aea62222b3a1..41371c56f360 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -1048,6 +1048,7 @@ xfs_ialloc( | |||
1048 | xfs_inode_t *ip; | 1048 | xfs_inode_t *ip; |
1049 | uint flags; | 1049 | uint flags; |
1050 | int error; | 1050 | int error; |
1051 | timespec_t tv; | ||
1051 | 1052 | ||
1052 | /* | 1053 | /* |
1053 | * Call the space management code to pick | 1054 | * Call the space management code to pick |
@@ -1128,7 +1129,13 @@ xfs_ialloc( | |||
1128 | ip->i_size = 0; | 1129 | ip->i_size = 0; |
1129 | ip->i_d.di_nextents = 0; | 1130 | ip->i_d.di_nextents = 0; |
1130 | ASSERT(ip->i_d.di_nblocks == 0); | 1131 | ASSERT(ip->i_d.di_nblocks == 0); |
1131 | xfs_ichgtime(ip, XFS_ICHGTIME_CHG|XFS_ICHGTIME_ACC|XFS_ICHGTIME_MOD); | 1132 | |
1133 | nanotime(&tv); | ||
1134 | ip->i_d.di_mtime.t_sec = (__int32_t)tv.tv_sec; | ||
1135 | ip->i_d.di_mtime.t_nsec = (__int32_t)tv.tv_nsec; | ||
1136 | ip->i_d.di_atime = ip->i_d.di_mtime; | ||
1137 | ip->i_d.di_ctime = ip->i_d.di_mtime; | ||
1138 | |||
1132 | /* | 1139 | /* |
1133 | * di_gen will have been taken care of in xfs_iread. | 1140 | * di_gen will have been taken care of in xfs_iread. |
1134 | */ | 1141 | */ |