diff mbox series

[09/18] btrfs-progs: make reada_for_search static

Message ID 0bce8f5d59f15495ebee3491b7991296728cbef5.1681939316.git.josef@toxicpanda.com (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: more prep work for syncing ctree.c | expand

Commit Message

Josef Bacik April 19, 2023, 9:24 p.m. UTC
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(-)
diff mbox series

Patch

diff --git a/cmds/restore.c b/cmds/restore.c
index 72fc7a07..9fe7b4d2 100644
--- a/cmds/restore.c
+++ b/cmds/restore.c
@@ -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;
diff --git a/kernel-shared/ctree.c b/kernel-shared/ctree.c
index 35133268..3e1085a0 100644
--- a/kernel-shared/ctree.c
+++ b/kernel-shared/ctree.c
@@ -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;
diff --git a/kernel-shared/ctree.h b/kernel-shared/ctree.h
index 50f97533..2237f3ef 100644
--- a/kernel-shared/ctree.h
+++ b/kernel-shared/ctree.h
@@ -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,