
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IBEQJ3 -------------------------------- This reverts commit e7fc2b31e04c46c9e2098bba710c9951c6b968af. We are about to revert 95257987a638 ("ext4: drop EXT4_MF_FS_ABORTED flag"), therefore the changes to the sb_rdonly check are being reverted here. Fixes: e7fc2b31e04c ("ext4: warn on read-only filesystem in ext4_journal_check_start()") Signed-off-by: Baokun Li <libaokun1@huawei.com> --- fs/ext4/ext4_jbd2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c index cac0eb5068d3..938bc8e157de 100644 --- a/fs/ext4/ext4_jbd2.c +++ b/fs/ext4/ext4_jbd2.c @@ -71,9 +71,8 @@ static int ext4_journal_check_start(struct super_block *sb) if (unlikely(ext4_forced_shutdown(sb))) return -EIO; - if (WARN_ON_ONCE(sb_rdonly(sb))) + if (sb_rdonly(sb)) return -EROFS; - WARN_ON(sb->s_writers.frozen == SB_FREEZE_COMPLETE); journal = EXT4_SB(sb)->s_journal; /* -- 2.46.1