linux/fs/jbd2
Jan Kara 50452704ec jbd2: do not try to recover wiped journal
[ Upstream commit a662f3c03b ]

If a journal is wiped, we will set journal->j_tail to 0. However if
'write' argument is not set (as it happens for read-only device or for
ocfs2), the on-disk superblock is not updated accordingly and thus
jbd2_journal_recover() cat try to recover the wiped journal. Fix the
check in jbd2_journal_recover() to use journal->j_tail for checking
empty journal instead.

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://patch.msgid.link/20250206094657.20865-4-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-05-29 11:02:16 +02:00
..
checkpoint.c ext4: fix incorrect tid assumption in jbd2_journal_shrink_checkpoint_list() 2024-08-26 23:39:48 -04:00
commit.c jbd2: flush filesystem device before updating tail sequence 2025-01-17 13:40:33 +01:00
journal.c jbd2: remove wrong sb->s_sequence check 2025-04-20 10:15:44 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
recovery.c jbd2: do not try to recover wiped journal 2025-05-29 11:02:16 +02:00
revoke.c fs/jbd2: use sleeping version of __find_get_block() 2025-05-29 11:02:00 +02:00
transaction.c jbd2: avoid infinite transaction commit loop 2024-07-08 23:59:37 -04:00