bcachefs: bch2_journal_meta() takes ref on c->writes
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 12 Oct 2024 02:50:48 +0000 (22:50 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 21 Dec 2024 06:36:15 +0000 (01:36 -0500)
commitfb8c835b18d48dac953a5d755a8e90b0d8fb9c29
tree451bc1fd30f01f0d444715f91a7aa6b238999f42
parent8b22abb4c84058e9533d71a4814e54316ba2621f
bcachefs: bch2_journal_meta() takes ref on c->writes

This part of addressing
https://github.com/koverstreet/bcachefs/issues/656

where we're getting stuck in bch2_journal_meta() in the dump tool.

We shouldn't be invoking the journal without a ref on c->writes (if
we're not RW), and there's no reason for the dump tool to be going
read-write.

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