btrfs: use helper btrfs_get_block_group
authorAnand Jain <anand.jain@oracle.com>
Wed, 3 Jun 2020 10:10:20 +0000 (18:10 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 27 Jul 2020 10:55:21 +0000 (12:55 +0200)
commitb5790d51809b3b0b5f0d012fa667b4e6cafd676e
treec5e60a8f366ec521920ae813883677b3b6abd26c
parent69b0e093c7859681e8012727d75f639154a7cfb3
btrfs: use helper btrfs_get_block_group

Use the helper function where it is open coded to increment the
block_group reference count As btrfs_get_block_group() is a one-liner we
could have open-coded it, but its partner function
btrfs_put_block_group() isn't one-liner which does the free part in it.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/free-space-cache.c