Commit 2a039f1e authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: free trans->mem on commit

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent a1d58243
...@@ -861,12 +861,15 @@ int bch2_trans_commit(struct btree_trans *trans, ...@@ -861,12 +861,15 @@ int bch2_trans_commit(struct btree_trans *trans,
BUG_ON(!(trans->flags & BTREE_INSERT_ATOMIC) && ret == -EINTR); BUG_ON(!(trans->flags & BTREE_INSERT_ATOMIC) && ret == -EINTR);
bch2_trans_unlink_iters(trans, trans->iters_unlink_on_commit);
if (!ret) { if (!ret) {
bch2_trans_unlink_iters(trans, ~trans->iters_touched); bch2_trans_unlink_iters(trans, ~trans->iters_touched|
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;
return ret; return ret;
err: err:
......
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