Skip to content

Commit e150a7e

Browse files
author
Kent Overstreet
committed
bcachefs: Fix bch2_trigger_alloc assert
On testing on an old mangled filesystem, we missed a case. Fixes: bd864bc ("bcachefs: Fix bch2_trigger_alloc when upgrading from old versions") Signed-off-by: Kent Overstreet <[email protected]>
1 parent 49203a6 commit e150a7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/bcachefs/alloc_background.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ int bch2_trigger_alloc(struct btree_trans *trans,
829829
if (likely(new.k->type == KEY_TYPE_alloc_v4)) {
830830
new_a = bkey_s_to_alloc_v4(new).v;
831831
} else {
832-
BUG_ON(!(flags & BTREE_TRIGGER_gc));
832+
BUG_ON(!(flags & (BTREE_TRIGGER_gc|BTREE_TRIGGER_check_repair)));
833833

834834
struct bkey_i_alloc_v4 *new_ka = bch2_alloc_to_v4_mut_inlined(trans, new.s_c);
835835
ret = PTR_ERR_OR_ZERO(new_ka);

0 commit comments

Comments
 (0)