Skip to content

Commit 3f89076

Browse files
author
Kent Overstreet
committed
bcachefs: fsck: fix unhandled restart in topology repair
Signed-off-by: Kent Overstreet <[email protected]>
1 parent bbc3a0b commit 3f89076

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

fs/bcachefs/btree_gc.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,14 @@ static int bch2_btree_repair_topology_recurse(struct btree_trans *trans, struct
503503
prt_newline(&buf);
504504
bch2_bkey_val_to_text(&buf, c, bkey_i_to_s_c(&b->key));
505505

506+
/*
507+
* XXX: we're not passing the trans object here because we're not set up
508+
* to handle a transaction restart - this code needs to be rewritten
509+
* when we start doing online topology repair
510+
*/
511+
bch2_trans_unlock_long(trans);
506512
if (mustfix_fsck_err_on(!have_child,
507-
trans, btree_node_topology_interior_node_empty,
513+
c, btree_node_topology_interior_node_empty,
508514
"empty interior btree node at %s", buf.buf))
509515
ret = DROP_THIS_NODE;
510516
err:

0 commit comments

Comments
 (0)