aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorTsutomu Itoh <t-itoh@jp.fujitsu.com>2012-11-07 23:47:33 -0500
committerJosef Bacik <jbacik@fusionio.com>2012-12-12 17:15:26 -0500
commite1f5790e0588bc5b11eb57f95bfde8702049dd0d (patch)
treefee29e0121343b9ef703f508e8696b013d390097 /fs/btrfs
parentd03f918ab9036cc71740c0aa796c8e02e6f6f6d3 (diff)
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 <t-itoh@jp.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index d2df98124d0f..883cf826cf25 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1964,6 +1964,9 @@ out_trans:
1964 if (!trans) 1964 if (!trans)
1965 goto out_free; 1965 goto out_free;
1966 1966
1967 inode_inc_iversion(inode);
1968 inode->i_mtime = inode->i_ctime = CURRENT_TIME;
1969
1967 trans->block_rsv = &root->fs_info->trans_block_rsv; 1970 trans->block_rsv = &root->fs_info->trans_block_rsv;
1968 ret = btrfs_update_inode(trans, root, inode); 1971 ret = btrfs_update_inode(trans, root, inode);
1969 nr = trans->blocks_used; 1972 nr = trans->blocks_used;