diff options
author | Zhiguo Niu <zhiguo.niu@unisoc.com> | 2023-10-18 09:51:02 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2023-10-20 04:21:26 +0300 |
commit | 9b4c8dd99fe48721410741651d426015e03a4b7a (patch) | |
tree | 7c01235cb4549d0d9c5683daaf5aadd0f5e364d0 /fs/f2fs/node.c | |
parent | 50a472bbc79ff9d5a88be8019a60e936cadf9f13 (diff) | |
download | linux-9b4c8dd99fe48721410741651d426015e03a4b7a.tar.xz |
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 <zhiguo.niu@unisoc.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r-- | fs/f2fs/node.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 256270d6a065..6c7f6a649d27 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1467,7 +1467,8 @@ page_hit: ofs_of_node(page), cpver_of_node(page), next_blkaddr_of_node(page)); set_sbi_flag(sbi, SBI_NEED_FSCK); - err = -EINVAL; + f2fs_handle_error(sbi, ERROR_INCONSISTENT_FOOTER); + err = -EFSCORRUPTED; out_err: ClearPageUptodate(page); out_put_err: |