diff options
| author | Jan Kara <jack@suse.cz> | 2025-02-06 10:46:58 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-05-02 07:39:15 +0200 |
| commit | cf30432f5b3064ff85d85639c2f0106f89c566f6 (patch) | |
| tree | 09e2b0b1c2c242e7967f6c92ca5aaf5e1cee2eef | |
| parent | 1b54faa5f47fa7c642179744aeff03f0810dc62e (diff) | |
jbd2: remove wrong sb->s_sequence check
commit e6eff39dd0fe4190c6146069cc16d160e71d1148 upstream.
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 <jack@suse.cz>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://patch.msgid.link/20250206094657.20865-3-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | fs/jbd2/journal.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 564aedbd867f..513c0c45c90a 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -1432,7 +1432,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); |
