From: Jan Kara Date: Thu, 6 Feb 2025 09:46:58 +0000 (+0100) Subject: jbd2: remove wrong sb->s_sequence check X-Git-Tag: v6.15-rc1~145^2~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e6eff39dd0fe4190c6146069cc16d160e71d1148;p=thirdparty%2Fkernel%2Flinux.git jbd2: remove wrong sb->s_sequence check Journal emptiness is not determined by sb->s_sequence == 0 but rather by sb->s_start == 0 (which is set a few lines above). Furthermore 0 is a valid transaction ID so the check can spuriously trigger. Remove the invalid WARN_ON. CC: stable@vger.kernel.org Signed-off-by: Jan Kara Reviewed-by: Zhang Yi Link: https://patch.msgid.link/20250206094657.20865-3-jack@suse.cz Signed-off-by: Theodore Ts'o --- diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index d8084b31b3610..d210e8a82e666 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -1869,7 +1869,6 @@ int jbd2_journal_update_sb_log_tail(journal_t *journal, tid_t tail_tid, /* Log is no longer empty */ write_lock(&journal->j_state_lock); - WARN_ON(!sb->s_sequence); journal->j_flags &= ~JBD2_FLUSHED; write_unlock(&journal->j_state_lock);