Skip to content

Commit

Permalink
bcachefs: Fix assert for online fsck
Browse files Browse the repository at this point in the history
We can't check if we're racing with fsck ending until mark_lock is held.

Signed-off-by: Kent Overstreet <[email protected]>
  • Loading branch information
Kent Overstreet committed Dec 16, 2024
1 parent b5677d4 commit ca2e7a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/bcachefs/disk_accounting.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ static inline int bch2_accounting_mem_mod_locked(struct btree_trans *trans,
bpos_to_disk_accounting_pos(&acc_k, a.k->p);
bool gc = mode == BCH_ACCOUNTING_gc;

EBUG_ON(gc && !acc->gc_running);
if (gc && !acc->gc_running)
return 0;

if (!bch2_accounting_is_mem(acc_k))
return 0;
Expand Down

0 comments on commit ca2e7a3

Please sign in to comment.