From: Kent Overstreet Date: Fri, 22 Jan 2021 00:15:49 +0000 (-0500) Subject: bcachefs: Fix a faulty assertion X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=fdbb88ac019462efcdcf83927e004e74088831f4;p=linux.git bcachefs: Fix a faulty assertion If journal replay hasn't finished, the journal can't be empty - oops. Signed-off-by: Kent Overstreet Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c index 6f84a5dd06bc4..ecc3629bcd4c8 100644 --- a/fs/bcachefs/journal.c +++ b/fs/bcachefs/journal.c @@ -953,6 +953,7 @@ void bch2_fs_journal_stop(struct journal *j) journal_quiesce(j); BUG_ON(!bch2_journal_error(j) && + test_bit(JOURNAL_REPLAY_DONE, &j->flags) && (journal_entry_is_open(j) || j->last_empty_seq + 1 != journal_cur_seq(j)));