bcachefs: Don't call bch2_trans_update() unlocked
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 23 Feb 2023 00:39:02 +0000 (19:39 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:54 +0000 (17:09 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/move.c

index c964643..814ca33 100644 (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);
 }