Commit ed5580b4 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix a btree iterator leak

Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent d7b21954
......@@ -858,8 +858,10 @@ static int extent_handle_overwrites(struct btree_trans *trans,
BTREE_ITER_NOT_EXTENTS|
BTREE_ITER_INTENT);
ret = bch2_btree_iter_traverse(update_iter);
if (ret)
if (ret) {
bch2_trans_iter_put(trans, update_iter);
goto out;
}
bch2_trans_update(trans, update_iter, update,
BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE|
......
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