diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-06-23 12:55:16 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-06-23 12:55:32 -0400 |
commit | 89d21b69b4f88e7a04b66bec38a01470cd40d703 (patch) | |
tree | a79d7a5f6163e6ceb38ce333e45820ed3f571b16 /fs | |
parent | d6b52f6828e6d9bb1fe35f889e1a9d0dcff0e21d (diff) |
bcachefs: Add missing bch2_journal_do_writes() call
This fixes a rare deadlock when we're doing an emergency shutdown due to
failure to do a journal write.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bcachefs/journal_io.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c index 492426c8d869..db24ce21b2ac 100644 --- a/fs/bcachefs/journal_io.c +++ b/fs/bcachefs/journal_io.c @@ -1677,6 +1677,13 @@ static CLOSURE_CALLBACK(journal_write_done) mod_delayed_work(j->wq, &j->write_work, max(0L, delta)); } + /* + * We don't typically trigger journal writes from her - the next journal + * write will be triggered immediately after the previous one is + * allocated, in bch2_journal_write() - but the journal write error path + * is special: + */ + bch2_journal_do_writes(j); spin_unlock(&j->lock); } |