summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-12-17 00:41:25 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2025-01-10 07:38:41 +0300
commitfa3e5135e4e7bfb38598a58caf592c940eff4b03 (patch)
tree917fd0528bf5629237af7ae9ad98e22e6cbd9fe7
parentcf3da2d627037a0848e25dbaeaedfadfe534c7c4 (diff)
downloadlinux-fa3e5135e4e7bfb38598a58caf592c940eff4b03.tar.xz
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>
-rw-r--r--fs/bcachefs/disk_accounting.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/disk_accounting.h b/fs/bcachefs/disk_accounting.h
index fc1b673689c8..5360cbb3ec29 100644
--- a/fs/bcachefs/disk_accounting.h
+++ b/fs/bcachefs/disk_accounting.h
@@ -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;