diff options
author | Theodore Ts'o <tytso@mit.edu> | 2009-06-15 03:41:23 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-06-15 03:41:23 -0400 |
commit | 4159175058987cb68aefd0e9eec2598b795363b4 (patch) | |
tree | 452a3ef5f8f2ae4c79095519078383fe766d69ab /fs | |
parent | de9a55b841132f7ae097f6e31ccebad2d5030cf5 (diff) | |
download | kernel_samsung_smdk4412-4159175058987cb68aefd0e9eec2598b795363b4.zip kernel_samsung_smdk4412-4159175058987cb68aefd0e9eec2598b795363b4.tar.gz kernel_samsung_smdk4412-4159175058987cb68aefd0e9eec2598b795363b4.tar.bz2 |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/inode.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 8d0908a..7c17ae2 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, } /* We are done with atomic stuff, now do the rest of housekeeping */ - - inode->i_ctime = ext4_current_time(inode); - ext4_mark_inode_dirty(handle, inode); - /* had we spliced it onto indirect block? */ if (where->bh) { /* @@ -878,8 +874,8 @@ static int ext4_splice_branch(handle_t *handle, struct inode *inode, } else { /* * OK, we spliced it into the inode itself on a direct block. - * Inode was dirtied above. */ + ext4_mark_inode_dirty(handle, inode); jbd_debug(5, "splicing direct\n"); } return err; |