summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/move.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-05-14 23:01:14 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:10:01 -0400
commita49bd8c007e4f4840f8c4d7fe7d62c7bdc7fffca (patch)
tree9f7ed9e4c9d7afff7ee44555484788cede6f638e /fs/bcachefs/move.c
parentd598a9b7e27158d3b6972077e2f7296f279c2e8b (diff)
downloadlinux-stable-a49bd8c007e4f4840f8c4d7fe7d62c7bdc7fffca.tar.gz
linux-stable-a49bd8c007e4f4840f8c4d7fe7d62c7bdc7fffca.tar.bz2
linux-stable-a49bd8c007e4f4840f8c4d7fe7d62c7bdc7fffca.zip
bcachefs: Delete an incorrect bch2_trans_unlock()
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>
Diffstat (limited to 'fs/bcachefs/move.c')
-rw-r--r--fs/bcachefs/move.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/bcachefs/move.c b/fs/bcachefs/move.c
index 7e22176a5c7e..2ec30a3fd193 100644
--- a/fs/bcachefs/move.c
+++ b/fs/bcachefs/move.c
@@ -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);