Commit 32abe2e3 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 is set to true before we
call bch2_trans_update in __bch2_dev_usrdata_drop.
Signed-off-by: default avatarDan Robertson <dan@dlrobertson.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 729608a6
......@@ -73,7 +73,8 @@ static int __bch2_dev_usrdata_drop(struct bch_fs *c, unsigned dev_idx, int flags
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);
......
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