Skip to content

Commit fa3e513

Browse files
author
Kent Overstreet
committed
bcachefs: Fix assert for online fsck
We can't check if we're racing with fsck ending until mark_lock is held. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
1 parent cf3da2d commit fa3e513

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

fs/bcachefs/disk_accounting.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ static inline int bch2_accounting_mem_mod_locked(struct btree_trans *trans,
138138
bpos_to_disk_accounting_pos(&acc_k, a.k->p);
139139
bool gc = mode == BCH_ACCOUNTING_gc;
140140

141-
EBUG_ON(gc && !acc->gc_running);
141+
if (gc && !acc->gc_running)
142+
return 0;
142143

143144
if (!bch2_accounting_is_mem(acc_k))
144145
return 0;

0 commit comments

Comments
 (0)