aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2009-06-15 03:41:23 -0400
committerTheodore Ts'o <tytso@mit.edu>2009-06-15 03:41:23 -0400
commit4159175058987cb68aefd0e9eec2598b795363b4 (patch)
tree452a3ef5f8f2ae4c79095519078383fe766d69ab
parentde9a55b841132f7ae097f6e31ccebad2d5030cf5 (diff)
ext4: Don't update ctime for non-extent-mapped inodes
The VFS handles updating ctime, so we don't need to update the inode's ctime in ext4_splace_branch() to update the direct or indirect blocks. This was harmless when we did this in ext3, but in ext4, thanks to delayed allocation, updating the ctime in ext4_splice_branch() can cause the ctime to mysteriously jump when the blocks are finally allocated. Thanks to Björn Steinbrink for pointing out this problem on the git mailing list. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r--fs/ext4/inode.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 8d0908afbd5b..7c17ae275af4 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -856,10 +856,6 @@ static int ext4_splice_branch(handle_t *handle, struct inode *inode,
856 } 856 }
857 857
858 /* We are done with atomic stuff, now do the rest of housekeeping */ 858 /* We are done with atomic stuff, now do the rest of housekeeping */
859
860 inode->i_ctime = ext4_current_time(inode);
861 ext4_mark_inode_dirty(handle, inode);
862
863 /* had we spliced it onto indirect block? */ 859 /* had we spliced it onto indirect block? */
864 if (where->bh) { 860 if (where->bh) {
865 /* 861 /*
@@ -878,8 +874,8 @@ static int ext4_splice_branch(handle_t *handle, struct inode *inode,
878 } else { 874 } else {
879 /* 875 /*
880 * OK, we spliced it into the inode itself on a direct block. 876 * OK, we spliced it into the inode itself on a direct block.
881 * Inode was dirtied above.
882 */ 877 */
878 ext4_mark_inode_dirty(handle, inode);
883 jbd_debug(5, "splicing direct\n"); 879 jbd_debug(5, "splicing direct\n");
884 } 880 }
885 return err; 881 return err;