Skip to content

Commit 9b4c8dd

Browse files
Zhiguo NiuJaegeuk Kim
authored andcommitted
f2fs: fix error handling of __get_node_page
Use f2fs_handle_error to record inconsistent node block error and return -EFSCORRUPTED instead of -EINVAL. Signed-off-by: Zhiguo Niu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 50a472b commit 9b4c8dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/f2fs/node.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,8 @@ static struct page *__get_node_page(struct f2fs_sb_info *sbi, pgoff_t nid,
14671467
ofs_of_node(page), cpver_of_node(page),
14681468
next_blkaddr_of_node(page));
14691469
set_sbi_flag(sbi, SBI_NEED_FSCK);
1470-
err = -EINVAL;
1470+
f2fs_handle_error(sbi, ERROR_INCONSISTENT_FOOTER);
1471+
err = -EFSCORRUPTED;
14711472
out_err:
14721473
ClearPageUptodate(page);
14731474
out_put_err:

0 commit comments

Comments
 (0)