Skip to content

Commit

Permalink
btrfs: inline code of reada_tree_block and remove it
Browse files Browse the repository at this point in the history
It's trivial with a single user. And remove one pointless BUG_ON.

Signed-off-by: David Sterba <dsterba@suse.cz>
  • Loading branch information
David Sterba committed Oct 2, 2014
1 parent 6197d86 commit 453848a
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions fs/btrfs/relocation.c
Original file line number Diff line number Diff line change
Expand Up @@ -2857,15 +2857,6 @@ static int get_tree_block_key(struct reloc_control *rc,
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
*/
Expand Down Expand Up @@ -2945,7 +2936,8 @@ int relocate_tree_blocks(struct btrfs_trans_handle *trans,
while (rb_node) {
block = rb_entry(rb_node, struct tree_block, rb_node);
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);
}

Expand Down

0 comments on commit 453848a

Please sign in to comment.