Skip to content
Snippets Groups Projects
Commit 737dd7ec authored by Jan Kara's avatar Jan Kara Committed by Cheng Jian
Browse files

ext4: save error info to sb through journal if available


mainline inclusion
from mainline-v5.11-rc4
commit 2d01ddc86606564fb08c56e3bc93a0693895f710
category: bugfix
bugzilla: 46758
CVE: NA

-----------------------------------------------

If journalling is still working at the moment we get to writing error
information to the superblock we cannot write directly to the superblock
as such write could race with journalled update of the superblock and
cause journal checksum failures, writing inconsistent information to the
journal or other problems. We cannot journal the superblock directly
from the error handling functions as we are running in uncertain context
and could deadlock so just punt journalled superblock update to a
workqueue.

Signed-off-by: default avatarJan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20201216101844.22917-5-jack@suse.cz


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>

conflicts:
fs/ext4/super.c

Signed-off-by: default avatarYe Bin <yebin10@huawei.com>
Reviewed-by: default avatarzhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarCheng Jian <cj.chengjian@huawei.com>
parent 38678b19
No related branches found
No related tags found
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment