android_kernel_samsung_a7y1.../fs/btrfs
Qu Wenruo 12e1cecfd1 btrfs: block-group: Fix a memory leak due to missing btrfs_put_block_group()
commit 4b654acdae850f48b8250b9a578a4eaa518c7a6f upstream.

In btrfs_read_block_groups(), if we have an invalid block group which
has mixed type (DATA|METADATA) while the fs doesn't have MIXED_GROUPS
feature, we error out without freeing the block group cache.

This patch will add the missing btrfs_put_block_group() to prevent
memory leak.

Note for stable backports: the file to patch in versions <= 5.3 is
fs/btrfs/extent-tree.c

Fixes: 49303381f19a ("Btrfs: bail out if block group has different mixed flag")
CC: stable@vger.kernel.org # 4.9+
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-07 09:27:00 +02:00
..
tests A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
acl.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
async-thread.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
async-thread.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
backref.c Btrfs: do not start a transaction at iterate_extent_inodes() 2020-04-06 18:12:40 +02:00
backref.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
btrfs_inode.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
check-integrity.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
check-integrity.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
compression.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
compression.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ctree.c btrfs: Relinquish CPUs in btrfs_compare_trees 2020-04-07 07:41:23 +02:00
ctree.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
delayed-inode.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
delayed-inode.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
delayed-ref.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
delayed-ref.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dev-replace.c btrfs: Ensure replaced device doesn't have pending chunk allocation 2020-04-06 19:21:08 +02:00
dev-replace.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dir-item.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
disk-io.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
disk-io.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
export.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
export.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
extent_io.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
extent_io.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
extent_map.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
extent_map.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
extent-tree.c btrfs: block-group: Fix a memory leak due to missing btrfs_put_block_group() 2020-04-07 09:27:00 +02:00
extent-tree.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
file-item.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
file.c Btrfs: fix race between ranged fsync and writeback of adjacent ranges 2020-04-06 18:15:06 +02:00
free-space-cache.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
free-space-cache.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hash.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hash.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
inode-item.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
inode-map.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
inode-map.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
inode.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ioctl.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lzo.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
math.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ordered-data.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ordered-data.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
orphan.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
print-tree.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
print-tree.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
props.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
props.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
qgroup.c Btrfs: fix race setting up and completing qgroup rescan workers 2020-04-07 07:41:26 +02:00
qgroup.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
raid56.c btrfs: raid56: properly unmap parity page in finish_parity_scrub() 2020-04-06 12:57:22 +02:00
raid56.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rcu-string.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
reada.c btrfs: start readahead also in seed devices 2020-04-06 19:16:44 +02:00
relocation.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
root-tree.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
scrub.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
send.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
send.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
struct-funcs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
super.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sysfs.c btrfs: sysfs: don't leak memory when failing add fsid 2020-04-06 18:15:08 +02:00
sysfs.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
transaction.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
transaction.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tree-checker.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tree-checker.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tree-defrag.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tree-log.c Btrfs: fix assertion failure during fsync and use of stale transaction 2020-04-06 21:35:33 +02:00
tree-log.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ulist.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ulist.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
uuid-tree.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
volumes.c btrfs: fix minimum number of chunk errors for DUP 2020-04-06 20:26:57 +02:00
volumes.h btrfs: Ensure replaced device doesn't have pending chunk allocation 2020-04-06 19:21:08 +02:00
xattr.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xattr.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
zlib.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30