]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
Btrfs: add missing inode version, ctime and mtime updates when punching hole
authorFilipe Manana <fdmanana@suse.com>
Wed, 19 Jun 2019 12:05:50 +0000 (13:05 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit5cb49675f31556e5d9b5c5e4d597037bdaf4adf8
tree42d2b444bb2cdf728543445a0301a6110f04ad4b
parenta12f184a47ecadcf186d07988442569a6ce36ba6
Btrfs: add missing inode version, ctime and mtime updates when punching hole

BugLink: https://bugs.launchpad.net/bugs/1839036
commit 179006688a7e888cbff39577189f2e034786d06a upstream.

If the range for which we are punching a hole covers only part of a page,
we end up updating the inode item but we skip the update of the inode's
iversion, mtime and ctime. Fix that by ensuring we update those properties
of the inode.

A patch for fstests test case generic/059 that tests this as been sent
along with this fix.

Fixes: 2aaa66558172b0 ("Btrfs: add hole punching")
Fixes: e8c1c76e804b18 ("Btrfs: add missing inode update when punching hole")
CC: stable@vger.kernel.org # 4.4+
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/btrfs/file.c