提交 89d7da9b 编写于 作者: J Johannes Thumshirn 提交者: David Sterba

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: NNikolay Borisov <nborisov@suse.com>
Signed-off-by: NJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 96f9b0f2
...@@ -1566,7 +1566,7 @@ static int find_first_block_group(struct btrfs_fs_info *fs_info, ...@@ -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_tree *em_tree;
struct extent_map *em; struct extent_map *em;
em_tree = &root->fs_info->mapping_tree; em_tree = &fs_info->mapping_tree;
read_lock(&em_tree->lock); read_lock(&em_tree->lock);
em = lookup_extent_mapping(em_tree, found_key.objectid, em = lookup_extent_mapping(em_tree, found_key.objectid,
found_key.offset); found_key.offset);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册