From 89d7da9bc592aa6a341d00f2d949615a89bb1eb7 Mon Sep 17 00:00:00 2001 From: Johannes Thumshirn Date: Tue, 2 Jun 2020 19:05:56 +0900 Subject: [PATCH] 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 Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba --- fs/btrfs/block-group.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c index e29e9629b246b..bfb5f42583363 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); -- 2.30.2