bcachefs: Don't pass trans to fsck_err() in gc_accounting_done
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 9 Jun 2025 21:28:00 +0000 (17:28 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 12 Jun 2025 03:21:30 +0000 (23:21 -0400)
commitc3dd25319c1818e067f41f41127f935f153498e6
tree8c9d841ec91492e1d909621c5dc8cd415ddb90f7
parent9e48f574e55731106b26dc33d8b0be1adedf3f20
bcachefs: Don't pass trans to fsck_err() in gc_accounting_done

fsck_err() can return a transaction restart if passed a transaction
object - this has always been true when it has to drop locks to prompt
for user input, but we're seeing this more now that we're logging the
error being corrected in the journal.

gc_accounting_done() doesn't call fsck_err() from an actual commit loop,
and it doesn't need to be holding btree locks when it calls fsck_err(),
so the easy fix here for the unhandled transaction restart is to just
not pass it the transaction object. We'll miss out on the fancy new
logging, but that's ok.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/disk_accounting.c