bcachefs: Delete an incorrect bch2_trans_unlock()
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 15 May 2023 03:01:14 +0000 (23:01 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:01 +0000 (17:10 -0400)
These deletes a bch2_trans_unlock() call from __bch2_move_data(). It was
redundant; bch2_move_extent() has the correct unlock call, and it was
buggy because when move_extent calls bch2_extent_drop_ptrs() we don't
want the transaction to be unlocked yet - this fixes a btree_iter.c
assertion.

Fixes https://github.com/koverstreet/bcachefs/issues/511.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/move.c

index 7e22176a5c7e5b4351b5b18227e70f1122979355..2ec30a3fd19377937768172386b49cf2ef093610 100644 (file)
@@ -583,7 +583,6 @@ static int __bch2_move_data(struct moving_context *ctxt,
                 */
                bch2_bkey_buf_reassemble(&sk, c, k);
                k = bkey_i_to_s_c(sk.k);
-               bch2_trans_unlock(&trans);
 
                ret2 = bch2_move_extent(&trans, &iter, ctxt, NULL,
                                        io_opts, btree_id, k, data_opts);