bcachefs: Don't call bch2_trans_update() unlocked

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2023-02-22 19:39:02 -05:00
parent 70ded998c5
commit e9b7014654

View File

@ -226,7 +226,8 @@ static int bch2_extent_drop_ptrs(struct btree_trans *trans,
if (bkey_deleted(&n->k))
n->k.size = 0;
return bch2_trans_update(trans, iter, n, BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE) ?:
return bch2_trans_relock(trans) ?:
bch2_trans_update(trans, iter, n, BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE) ?:
bch2_trans_commit(trans, NULL, NULL, BTREE_INSERT_NOFAIL);
}