bcache: Convert bch_btree_insert() to bch_btree_map_leaf_nodes()
Last of the btree_map() conversions. Main visible effect is
bch_btree_insert() is no longer taking a struct btree_op as an argument
anymore - there's no fancy state machine stuff going on, it's just a
normal function.
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c
index 592adf5..86de64a 100644
--- a/drivers/md/bcache/journal.c
+++ b/drivers/md/bcache/journal.c
@@ -302,10 +302,8 @@
uint64_t start = i->j.last_seq, end = i->j.seq, n = start;
struct keylist keylist;
- struct btree_op op;
bch_keylist_init(&keylist);
- bch_btree_op_init(&op, SHRT_MAX);
list_for_each_entry(i, list, list) {
BUG_ON(i->pin && atomic_read(i->pin) != 1);
@@ -322,7 +320,7 @@
bkey_copy(keylist.top, k);
bch_keylist_push(&keylist);
- ret = bch_btree_insert(&op, s, &keylist, i->pin, NULL);
+ ret = bch_btree_insert(s, &keylist, i->pin, NULL);
if (ret)
goto err;