bcachefs: free trans->mem on commit

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2019-04-03 17:11:15 -04:00 committed by Kent Overstreet
parent a1d58243f9
commit 2a039f1ee4

View File

@ -861,12 +861,15 @@ out_noupdates:
BUG_ON(!(trans->flags & BTREE_INSERT_ATOMIC) && ret == -EINTR);
bch2_trans_unlink_iters(trans, trans->iters_unlink_on_commit);
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;
} 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;
err: