]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix extent map leak during fallocate error path
authorFilipe Manana <fdmanana@suse.com>
Mon, 3 Apr 2017 14:57:17 +0000 (15:57 +0100)
committerFilipe Manana <fdmanana@suse.com>
Wed, 26 Apr 2017 15:27:24 +0000 (16:27 +0100)
commit14a75b13e0eee3b55972a41837d628d4a6ee8dd2
tree299a437444b82fec241f9533677782aa49ad0a70
parent1b43a297d5c705fa52155c9e75712f20a162e7d1
Btrfs: fix extent map leak during fallocate error path

If the call to btrfs_qgroup_reserve_data() failed, we were leaking an
extent map structure. The failure can happen either due to an -ENOMEM
condition or, when quotas are enabled, due to -EDQUOT for example.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
fs/btrfs/file.c