Btrfs: set hole punching time properly
authorTsutomu Itoh <t-itoh@jp.fujitsu.com>
Thu, 8 Nov 2012 04:47:33 +0000 (04:47 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Wed, 12 Dec 2012 22:15:26 +0000 (17:15 -0500)
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>
fs/btrfs/file.c

index d2df98124d0fed82ae8d50886247e35705d30d72..883cf826cf25a590a75281f3ba8bc4eb30ba6ab1 100644 (file)
@@ -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;
This page took 0.025522 seconds and 5 git commands to generate.