summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/block-group.c
diff options
context:
space:
mode:
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>2020-06-02 19:05:56 +0900
committerDavid Sterba <dsterba@suse.com>2020-07-27 12:55:20 +0200
commit89d7da9bc592aa6a341d00f2d949615a89bb1eb7 (patch)
tree962caa14d81c070785a041bfb8eeb48786ad0fe1 /fs/btrfs/block-group.c
parent96f9b0f2fa01c96e90abd4e981208a341a5da66e (diff)
downloadlinux-89d7da9bc592aa6a341d00f2d949615a89bb1eb7.tar.bz2
btrfs: get mapping tree directly from fsinfo in find_first_block_group
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 mapping_tree. Instead directly grab the mapping_tree from fs_info. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/block-group.c')
-rw-r--r--fs/btrfs/block-group.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
index e29e9629b246..bfb5f4258336 100644
--- a/fs/btrfs/block-group.c
+++ b/fs/btrfs/block-group.c
@@ -1566,7 +1566,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;
read_lock(&em_tree->lock);
em = lookup_extent_mapping(em_tree, found_key.objectid,
found_key.offset);