[PATCH openEuler-1.0-LTS] jbd2: remove wrong sb->s_sequence check

From: Jan Kara <jack@suse.cz> stable inclusion from stable-v5.10.237 commit b479839525fe7906966cdc4b5b2afbca048558a1 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IC6LPS CVE: CVE-2025-37839 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=... -------------------------------- 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> Signed-off-by: Zizhi Wo <wozizhi@huawei.com> --- fs/jbd2/journal.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index bf83e1c64aa4..5dddfc493ca7 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -1517,7 +1517,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); -- 2.39.2

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/16221 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/JPC... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/16221 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/JPC...
participants (2)
-
patchwork bot
-
Zizhi Wo