@@ -267,9 +267,6 @@ again:
continue;
}
- if (path->reada)
- reada_for_search(fs_info, path, level, slot, 0);
-
next = read_node_slot(fs_info, c, slot);
if (extent_buffer_uptodate(next))
break;
@@ -284,8 +281,6 @@ again:
path->slots[level] = 0;
if (!level)
break;
- if (path->reada)
- reada_for_search(fs_info, path, level, 0, 0);
next = read_node_slot(fs_info, next, 0);
if (!extent_buffer_uptodate(next))
goto again;
@@ -1205,8 +1205,9 @@ static int noinline push_nodes_for_insert(struct btrfs_trans_handle *trans,
/*
* readahead one full node of leaves
*/
-void reada_for_search(struct btrfs_fs_info *fs_info, struct btrfs_path *path,
- int level, int slot, u64 objectid)
+static void reada_for_search(struct btrfs_fs_info *fs_info,
+ struct btrfs_path *path, int level, int slot,
+ u64 objectid)
{
struct extent_buffer *node;
struct btrfs_disk_key disk_key;
@@ -929,8 +929,6 @@ int btrfs_del_ptr(struct btrfs_root *root, struct btrfs_path *path,
int level, int slot);
enum btrfs_tree_block_status btrfs_check_node(struct extent_buffer *buf);
enum btrfs_tree_block_status btrfs_check_leaf(struct extent_buffer *buf);
-void reada_for_search(struct btrfs_fs_info *fs_info, struct btrfs_path *path,
- int level, int slot, u64 objectid);
struct extent_buffer *read_node_slot(struct btrfs_fs_info *fs_info,
struct extent_buffer *parent, int slot);
int btrfs_previous_item(struct btrfs_root *root,
We were using this in cmds/restore.c, however it only does anything if path->reada is set, and we don't set that in cmds/restore.c. Remove this usage of reada_for_search and make the function static. Signed-off-by: Josef Bacik <josef@toxicpanda.com> --- cmds/restore.c | 5 ----- kernel-shared/ctree.c | 5 +++-- kernel-shared/ctree.h | 2 -- 3 files changed, 3 insertions(+), 9 deletions(-)