diff options
author | David Sterba <dsterba@suse.cz> | 2014-06-14 18:51:19 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-10-02 10:31:27 -0400 |
commit | 453848a05ff984cb3665bad5c7e0024e8cfe87a5 (patch) | |
tree | 5b289c9c748dff56624002c1db55f5fee4528747 | |
parent | 6197d86eabb844c1a9c99956d4e6b0f8eb548ad3 (diff) |
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: David Sterba <dsterba@suse.cz>
-rw-r--r-- | fs/btrfs/relocation.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 16cb2b4a9620..d7506325b024 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c | |||
@@ -2857,15 +2857,6 @@ static int get_tree_block_key(struct reloc_control *rc, | |||
2857 | return 0; | 2857 | return 0; |
2858 | } | 2858 | } |
2859 | 2859 | ||
2860 | static int reada_tree_block(struct reloc_control *rc, | ||
2861 | struct tree_block *block) | ||
2862 | { | ||
2863 | BUG_ON(block->key_ready); | ||
2864 | readahead_tree_block(rc->extent_root, block->bytenr, | ||
2865 | block->key.objectid); | ||
2866 | return 0; | ||
2867 | } | ||
2868 | |||
2869 | /* | 2860 | /* |
2870 | * helper function to relocate a tree block | 2861 | * helper function to relocate a tree block |
2871 | */ | 2862 | */ |
@@ -2945,7 +2936,8 @@ int relocate_tree_blocks(struct btrfs_trans_handle *trans, | |||
2945 | while (rb_node) { | 2936 | while (rb_node) { |
2946 | block = rb_entry(rb_node, struct tree_block, rb_node); | 2937 | block = rb_entry(rb_node, struct tree_block, rb_node); |
2947 | if (!block->key_ready) | 2938 | if (!block->key_ready) |
2948 | reada_tree_block(rc, block); | 2939 | readahead_tree_block(rc->extent_root, block->bytenr, |
2940 | block->key.objectid); | ||
2949 | rb_node = rb_next(rb_node); | 2941 | rb_node = rb_next(rb_node); |
2950 | } | 2942 | } |
2951 | 2943 | ||