aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2008-08-13 02:44:15 -0400
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-08-13 02:44:15 -0400
commitdff35fd41f252476cba7f761d7204dd9f47d739e (patch)
tree3f4da55c3e5aede3de6d97a11bd0d53656aa6781 /fs/xfs/xfs_inode.c
parentab4a9b04a33c97dd17495f943447f5a15ecf2b51 (diff)
[XFS] update timestamp in xfs_ialloc manually
In xfs_ialloc we just want to set all timestamps to the current time. We don't need to mark the inode dirty like xfs_ichgtime does, and we don't need nor want the opimizations in xfs_ichgtime that I will introduce in the next patch. So just opencode the timestamp update in xfs_ialloc, and remove the new unused XFS_ICHGTIME_ACC case in xfs_ichgtime. SGI-PV: 981498 SGI-Modid: xfs-linux-melb:xfs-kern:31825a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c9
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 */