Patch "f2fs: set SBI_NEED_FSCK flag when inconsistent node block found" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    f2fs: set SBI_NEED_FSCK flag when inconsistent node block found

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     f2fs-set-sbi_need_fsck-flag-when-inconsistent-node-b.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 994e286c954c2e787d21fc8c4971edd01b4149b9
Author: Weichao Guo <guoweichao@xxxxxxxx>
Date:   Sat Sep 18 20:46:36 2021 +0800

    f2fs: set SBI_NEED_FSCK flag when inconsistent node block found
    
    [ Upstream commit 6663b138ded1a59e630c9e605e42aa7fde490cdc ]
    
    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@xxxxxxxx>
    Reviewed-by: Chao Yu <chao@xxxxxxxxxx>
    Signed-off-by: Jaegeuk Kim <jaegeuk@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 597a145c08ef5..7e625806bd4a2 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1389,6 +1389,7 @@ static struct page *__get_node_page(struct f2fs_sb_info *sbi, pgoff_t nid,
 			  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);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux