f2fs: set SBI_NEED_FSCK flag when inconsistent node block found
[ Upstream commit 6663b138de ]
Inconsistent node block will cause a file fail to open or read,
which could make the user process crashes or stucks. Let's mark
SBI_NEED_FSCK flag to trigger a fix at next fsck time. After
unlinking the corrupted file, the user process could regenerate
a new one and work correctly.
Signed-off-by: Weichao Guo <guoweichao@oppo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
e6ee7abd6b
commit
22423c966e
1 changed files with 1 additions and 0 deletions
|
|
@ -1389,6 +1389,7 @@ page_hit:
|
|||
nid, nid_of_node(page), ino_of_node(page),
|
||||
ofs_of_node(page), cpver_of_node(page),
|
||||
next_blkaddr_of_node(page));
|
||||
set_sbi_flag(sbi, SBI_NEED_FSCK);
|
||||
err = -EINVAL;
|
||||
out_err:
|
||||
ClearPageUptodate(page);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue