From f33600057f50d3dea5cb3bda05c21ecce7125282 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sun, 10 Dec 2023 17:44:04 -0500 Subject: bcachefs: bch2_trans_node_add no longer uses trans_for_each_path() In the future we'll be making trans->paths resizable and potentially having _many_ more paths (for fsck); we need to start fixing algorithms that walk each path in a transaction where possible. Signed-off-by: Kent Overstreet --- fs/bcachefs/btree_update_interior.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'fs/bcachefs/btree_update_interior.c') diff --git a/fs/bcachefs/btree_update_interior.c b/fs/bcachefs/btree_update_interior.c index b3f1f7c9a5f4..cffc66cd481f 100644 --- a/fs/bcachefs/btree_update_interior.c +++ b/fs/bcachefs/btree_update_interior.c @@ -1601,10 +1601,10 @@ static int btree_split(struct btree_update *as, struct btree_trans *trans, bch2_btree_node_free_inmem(trans, path, b); if (n3) - bch2_trans_node_add(trans, n3); + bch2_trans_node_add(trans, path, n3); if (n2) - bch2_trans_node_add(trans, n2); - bch2_trans_node_add(trans, n1); + bch2_trans_node_add(trans, path2, n2); + bch2_trans_node_add(trans, path1, n1); if (n3) six_unlock_intent(&n3->c.lock); @@ -1913,7 +1913,7 @@ int __bch2_foreground_maybe_merge(struct btree_trans *trans, bch2_btree_node_free_inmem(trans, path, b); bch2_btree_node_free_inmem(trans, sib_path, m); - bch2_trans_node_add(trans, n); + bch2_trans_node_add(trans, path, n); bch2_trans_verify_paths(trans); @@ -1985,7 +1985,7 @@ int bch2_btree_node_rewrite(struct btree_trans *trans, bch2_btree_node_free_inmem(trans, iter->path, b); - bch2_trans_node_add(trans, n); + bch2_trans_node_add(trans, iter->path, n); six_unlock_intent(&n->c.lock); bch2_btree_update_done(as, trans); -- cgit v1.2.3