Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1f5790e authored by Tsutomu Itoh's avatar Tsutomu Itoh Committed by Josef Bacik
Browse files

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: default avatarTsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
parent d03f918a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1964,6 +1964,9 @@ static int btrfs_punch_hole(struct inode *inode, loff_t offset, loff_t len)
	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;