Commit d36e7f0e authored by Qu Wenruo's avatar Qu Wenruo Committed by David Sterba

btrfs: reloc: open code read_fs_root() for handle_indirect_tree_backref()

The backref code is going to be moved to backref.c, and read_fs_root()
is just a simple wrapper, open-code it to prepare to the incoming code
move.
Signed-off-by: default avatarQu Wenruo <wqu@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 55465730
......@@ -473,12 +473,16 @@ static int handle_indirect_tree_backref(struct btrfs_backref_cache *cache,
struct btrfs_backref_edge *edge;
struct extent_buffer *eb;
struct btrfs_root *root;
struct btrfs_key root_key;
struct rb_node *rb_node;
int level;
bool need_check = true;
int ret;
root = read_fs_root(fs_info, ref_key->offset);
root_key.objectid = ref_key->offset;
root_key.type = BTRFS_ROOT_ITEM_KEY;
root_key.offset = (u64)-1;
root = btrfs_get_fs_root(fs_info, &root_key, false);
if (IS_ERR(root))
return PTR_ERR(root);
if (!test_bit(BTRFS_ROOT_REF_COWS, &root->state))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment