[PATCH] ext4: Send ext4_handle_error message after set sb->s_flags

From: Ye Bin <yebin10@huawei.com> hulk inclusion category: bugfix bugzilla: NA CVE: NA ------------------------------------------------- Sysmonitor will check sb->s_flags if set SB_RDONLY, then judge if report exception message. Fixes: 3cfdac228065 ("ext4: report error to userspace by netlink") Signed-off-by: Ye Bin <yebin10@huawei.com> Reviewed-by: zhangyi (F) <yi.zhang@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- fs/ext4/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 4fdd17055dc5..5a09d52b864c 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -512,8 +512,6 @@ static void ext4_handle_error(struct super_block *sb) jbd2_journal_abort(journal, -EIO); } - ext4_netlink_send_info(sb, 1); - /* * We force ERRORS_RO behavior when system is rebooting. Otherwise we * could panic during 'reboot -f' as the underlying device got already @@ -531,6 +529,8 @@ static void ext4_handle_error(struct super_block *sb) panic("EXT4-fs (device %s): panic forced after error\n", sb->s_id); } + + ext4_netlink_send_info(sb, 1); } #define ext4_error_ratelimit(sb) \ -- 2.25.1
participants (1)
-
Yang Yingliang