bcachefs: remove unnecessary btree_insert_key_leaf() wrapper
authorBrian Foster <bfoster@redhat.com>
Wed, 19 Jul 2023 12:53:03 +0000 (08:53 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:08 +0000 (17:10 -0400)
This is in preparation to support prejournaled keys. We want the
ability to optionally pass a seq stored in the btree update rather
than the seq of the committing transaction.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_update_leaf.c

index 3638cef211b24e1485bf07f97526e88b8aeacc02..11b99228203259b28eacb3d1a7e51fa8de6af663 100644 (file)
@@ -290,12 +290,6 @@ inline void bch2_btree_insert_key_leaf(struct btree_trans *trans,
                bch2_trans_node_reinit_iter(trans, b);
 }
 
-static void btree_insert_key_leaf(struct btree_trans *trans,
-                                 struct btree_insert_entry *insert)
-{
-       bch2_btree_insert_key_leaf(trans, insert->path, insert->k, trans->journal_res.seq);
-}
-
 /* Cached btree updates: */
 
 /* Normal update interface: */
@@ -753,7 +747,7 @@ bch2_trans_commit_write_locked(struct btree_trans *trans, unsigned flags,
                i->k->k.needs_whiteout = false;
 
                if (!i->cached)
-                       btree_insert_key_leaf(trans, i);
+                       bch2_btree_insert_key_leaf(trans, i->path, i->k, trans->journal_res.seq);
                else if (!i->key_cache_already_flushed)
                        bch2_btree_insert_key_cached(trans, flags, i);
                else {