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: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2019-07-18 17:32:20 -04:00 committed by Kent Overstreet
parent a9058a223f
commit 8627f674bc

View file

@ -923,8 +923,6 @@ int bch2_trans_commit(struct btree_trans *trans,
bch2_trans_unlink_iters(trans, ~trans->iters_touched|
trans->iters_unlink_on_commit);
trans->iters_touched = 0;
} else {
bch2_trans_unlink_iters(trans, trans->iters_unlink_on_commit);
}
trans->nr_updates = 0;
trans->mem_top = 0;