summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/gc.c
diff options
context:
space:
mode:
authorZhiguo Niu <zhiguo.niu@unisoc.com>2024-03-08 14:25:25 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2024-03-12 18:25:17 -0700
commit31f85ccc84b82cc7eb122af01f5017fbe1e29289 (patch)
tree71eaa44bd312d580e5f84d5ccf7f62af752d3377 /fs/f2fs/gc.c
parent11bec96afbfbc4679863db55258de440d786821e (diff)
downloadlinux-31f85ccc84b82cc7eb122af01f5017fbe1e29289.tar.gz
linux-31f85ccc84b82cc7eb122af01f5017fbe1e29289.tar.bz2
linux-31f85ccc84b82cc7eb122af01f5017fbe1e29289.zip
f2fs: unify the error handling of f2fs_is_valid_blkaddr
There are some cases of f2fs_is_valid_blkaddr not handled as ERROR_INVALID_BLKADDR,so unify the error handling about all of f2fs_is_valid_blkaddr. Do f2fs_handle_error in __f2fs_is_valid_blkaddr for cleanup. Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com> Signed-off-by: Chao Yu <chao@kernel.org> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/gc.c')
-rw-r--r--fs/f2fs/gc.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 96ba3585f1cf..ca1bf412b882 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -1195,7 +1195,6 @@ static int ra_data_block(struct inode *inode, pgoff_t index)
if (unlikely(!f2fs_is_valid_blkaddr(sbi, dn.data_blkaddr,
DATA_GENERIC_ENHANCE_READ))) {
err = -EFSCORRUPTED;
- f2fs_handle_error(sbi, ERROR_INVALID_BLKADDR);
goto put_page;
}
goto got_it;
@@ -1214,7 +1213,6 @@ static int ra_data_block(struct inode *inode, pgoff_t index)
if (unlikely(!f2fs_is_valid_blkaddr(sbi, dn.data_blkaddr,
DATA_GENERIC_ENHANCE))) {
err = -EFSCORRUPTED;
- f2fs_handle_error(sbi, ERROR_INVALID_BLKADDR);
goto put_page;
}
got_it: