From: Tsutomu Itoh Date: Thu, 8 Nov 2012 04:47:33 +0000 (+0000) Subject: Btrfs: set hole punching time properly X-Git-Tag: v3.8-rc7~6^2~91 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1f5790e0588bc5b11eb57f95bfde8702049dd0d;p=platform%2Fkernel%2Flinux-exynos.git Btrfs: set hole punching time properly Even if the hole punching is executed, the modification time of the file is not updated. So, current time is set to inode. Signed-off-by: Tsutomu Itoh Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index d2df981..883cf82 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1964,6 +1964,9 @@ out_trans: if (!trans) goto out_free; + inode_inc_iversion(inode); + inode->i_mtime = inode->i_ctime = CURRENT_TIME; + trans->block_rsv = &root->fs_info->trans_block_rsv; ret = btrfs_update_inode(trans, root, inode); nr = trans->blocks_used;