]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: don't double unlock on error in btrfs_punch_hole
authorJosef Bacik <josef@toxicpanda.com>
Fri, 3 May 2019 15:10:06 +0000 (11:10 -0400)
committerDavid Sterba <dsterba@suse.com>
Fri, 3 May 2019 16:21:36 +0000 (18:21 +0200)
commita6f0af5be38169260ea77b46c479636f733b6eba
treebe1c2fcdc0d9968f7db0632976634e213604f710
parent19f343b07566858b6e626eee2f9e28943bb292bf
btrfs: don't double unlock on error in btrfs_punch_hole

If we have an error writing out a delalloc range in
btrfs_punch_hole_lock_range we'll unlock the inode and then goto
out_only_mutex, where we will again unlock the inode.  This is bad,
don't do this.

Fixes: a99f4dfcf808 ("Btrfs: add support for fallocate's zero range operation")
CC: stable@vger.kernel.org # 4.19+
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file.c