Commit 453848a0 authored by David Sterba's avatar David Sterba

btrfs: inline code of reada_tree_block and remove it

It's trivial with a single user. And remove one pointless BUG_ON.
Signed-off-by: default avatarDavid Sterba <dsterba@suse.cz>
parent 6197d86e
...@@ -2857,15 +2857,6 @@ static int get_tree_block_key(struct reloc_control *rc, ...@@ -2857,15 +2857,6 @@ static int get_tree_block_key(struct reloc_control *rc,
return 0; return 0;
} }
static int reada_tree_block(struct reloc_control *rc,
struct tree_block *block)
{
BUG_ON(block->key_ready);
readahead_tree_block(rc->extent_root, block->bytenr,
block->key.objectid);
return 0;
}
/* /*
* helper function to relocate a tree block * helper function to relocate a tree block
*/ */
...@@ -2945,7 +2936,8 @@ int relocate_tree_blocks(struct btrfs_trans_handle *trans, ...@@ -2945,7 +2936,8 @@ int relocate_tree_blocks(struct btrfs_trans_handle *trans,
while (rb_node) { while (rb_node) {
block = rb_entry(rb_node, struct tree_block, rb_node); block = rb_entry(rb_node, struct tree_block, rb_node);
if (!block->key_ready) if (!block->key_ready)
reada_tree_block(rc, block); readahead_tree_block(rc->extent_root, block->bytenr,
block->key.objectid);
rb_node = rb_next(rb_node); rb_node = rb_next(rb_node);
} }
......
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