mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
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: Dan Robertson <dan@dlrobertson.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
109a427712
commit
33a1f84b76
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user