summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/alloc_background.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-08-19 02:18:34 +0200
committerKent Overstreet <kent.overstreet@linux.dev>2024-08-22 08:07:22 +0200
commite150a7e89c4727176d07f5a0a8966fc2af05821c (patch)
treebf0ac43041d80ae94286bc02e63ce77e904fe829 /fs/bcachefs/alloc_background.c
parentbcachefs: Fix failure to relock in btree_node_get() (diff)
downloadlinux-e150a7e89c4727176d07f5a0a8966fc2af05821c.tar.xz
linux-e150a7e89c4727176d07f5a0a8966fc2af05821c.zip
bcachefs: Fix bch2_trigger_alloc assert
On testing on an old mangled filesystem, we missed a case. Fixes: bd864bc2d907 ("bcachefs: Fix bch2_trigger_alloc when upgrading from old versions") Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_background.c')
-rw-r--r--fs/bcachefs/alloc_background.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c
index fd3a2522bc3e..488d0710f7b9 100644
--- a/fs/bcachefs/alloc_background.c
+++ b/fs/bcachefs/alloc_background.c
@@ -829,7 +829,7 @@ int bch2_trigger_alloc(struct btree_trans *trans,
if (likely(new.k->type == KEY_TYPE_alloc_v4)) {
new_a = bkey_s_to_alloc_v4(new).v;
} else {
- BUG_ON(!(flags & BTREE_TRIGGER_gc));
+ BUG_ON(!(flags & (BTREE_TRIGGER_gc|BTREE_TRIGGER_check_repair)));
struct bkey_i_alloc_v4 *new_ka = bch2_alloc_to_v4_mut_inlined(trans, new.s_c);
ret = PTR_ERR_OR_ZERO(new_ka);