[v3,1/2] btrfs: get mapping tree directly from fsinfo in find_first_block_group
diff mbox series

Message ID 20200602100557.6938-2-johannes.thumshirn@wdc.com
State New
Headers show
  • small cleanups for find_first_block_group
Related show

Commit Message

Johannes Thumshirn June 2, 2020, 10:05 a.m. UTC
We already have an fs_info in our function parameters, there's no need to
do the maths again and get fs_info from the extent_root just to get the

Instead directly grab the mapping_tree from fs_info.

Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
 fs/btrfs/block-group.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff mbox series

diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
index 176e8a292fd1..e5641b6a3097 100644
--- a/fs/btrfs/block-group.c
+++ b/fs/btrfs/block-group.c
@@ -1556,7 +1556,7 @@  static int find_first_block_group(struct btrfs_fs_info *fs_info,
 			struct extent_map_tree *em_tree;
 			struct extent_map *em;
-			em_tree = &root->fs_info->mapping_tree;
+			em_tree = &fs_info->mapping_tree;
 			em = lookup_extent_mapping(em_tree, found_key.objectid,