Commit 33a1f84b authored by Dan Robertson's avatar Dan Robertson Committed by Kent Overstreet

bcachefs: ensure iter->should_be_locked is set

Ensure that iter->should_be_locked value is set to true before we
call bch2_trans_update in ec_stripe_update_ptrs.
Signed-off-by: default avatarDan Robertson <dan@dlrobertson.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 109a4277
......@@ -863,7 +863,8 @@ static int ec_stripe_update_ptrs(struct bch_fs *c,
extent_stripe_ptr_add(e, s, ec_ptr, block);
bch2_btree_iter_set_pos(iter, bkey_start_pos(&sk.k->k));
ret = bch2_trans_update(&trans, iter, sk.k, 0) ?:
ret = bch2_btree_iter_traverse(iter) ?:
bch2_trans_update(&trans, iter, sk.k, 0) ?:
bch2_trans_commit(&trans, NULL, NULL,
BTREE_INSERT_NOFAIL);
if (ret == -EINTR)
......
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