Commit 8627f674 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Don't unlink iters on unsuccessful commit

Where unlink_on_commit is used, on unsuccessfull commit we're likely
retrying the whole update and were going to be using the same iterators
again.

The management of multiple iterators needs to be gone over a fair bit
more at some point...
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent a9058a22
...@@ -923,8 +923,6 @@ int bch2_trans_commit(struct btree_trans *trans, ...@@ -923,8 +923,6 @@ int bch2_trans_commit(struct btree_trans *trans,
bch2_trans_unlink_iters(trans, ~trans->iters_touched| bch2_trans_unlink_iters(trans, ~trans->iters_touched|
trans->iters_unlink_on_commit); trans->iters_unlink_on_commit);
trans->iters_touched = 0; trans->iters_touched = 0;
} else {
bch2_trans_unlink_iters(trans, trans->iters_unlink_on_commit);
} }
trans->nr_updates = 0; trans->nr_updates = 0;
trans->mem_top = 0; trans->mem_top = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment