]> www.infradead.org Git - users/hch/xfs.git/commitdiff
bcachefs: Add missing bch2_journal_do_writes() call
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 23 Jun 2024 16:55:16 +0000 (12:55 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 23 Jun 2024 16:55:32 +0000 (12:55 -0400)
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>
fs/bcachefs/journal_io.c

index 492426c8d869ac178ccb20655314fedab75e8905..db24ce21b2acfa6fd3180b6a497e5a6470156fbe 100644 (file)
@@ -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);
 }