浏览代码

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>
Tsutomu Itoh 12 年之前
父节点
当前提交
e1f5790e05
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      fs/btrfs/file.c

+ 3 - 0
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;