]> git.hungrycats.org Git - linux/commitdiff
btrfs: inline code of reada_tree_block and remove it
authorDavid Sterba <dsterba@suse.cz>
Sat, 14 Jun 2014 22:51:19 +0000 (00:51 +0200)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Sun, 14 Dec 2014 03:31:06 +0000 (22:31 -0500)
It's trivial with a single user. And remove one pointless BUG_ON.

Signed-off-by: David Sterba <dsterba@suse.cz>
(cherry picked from commit 453848a05ff984cb3665bad5c7e0024e8cfe87a5)

fs/btrfs/relocation.c

index 91dd094208917eda4bd520c294d6c9026f9b1814..856639ec45ca6e60a9248d4373c7efa4e13b9830 100644 (file)
@@ -2890,15 +2890,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
  */
@@ -2978,7 +2969,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);
        }