Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2019-08-16 16:48:28 +0100
committerFilipe Manana <fdmanana@suse.com>2019-08-16 16:48:28 +0100
commitfaef505033124f75e5d24dab4a32c594370ad68a (patch)
tree1903e6f6e8df224e4d7738b48d9d4b5081e9a388
parent10fa205d451a5f6c55bbc6fa26555445a442ceec (diff)
Btrfs: add missing inode version, ctime and mtime updates when
punching hole (bsc#1140487). suse-commit: 7426909ca011cf92ee359d1b1a192a677c94e67b
-rw-r--r--fs/btrfs/file.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index e4137008e12b..c043ff63564d 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -2783,6 +2783,11 @@ out_only_mutex:
* for detecting, at fsync time, if the inode isn't yet in the
* log tree or it's there but not up to date.
*/
+ struct timespec64 now = current_time(inode);
+
+ inode_inc_iversion(inode);
+ inode->i_mtime = now;
+ inode->i_ctime = now;
trans = btrfs_start_transaction(root, 1);
if (IS_ERR(trans)) {
err = PTR_ERR(trans);