aboutsummaryrefslogtreecommitdiff
path: root/arch/Kconfig
diff options
context:
space:
mode:
authorYongpeng Yang2023-12-22 11:29:01 +0800
committerJaegeuk Kim2023-12-26 13:06:40 -0800
commit19ec1d31fa56255ebf866a9e7540d3b4d6069db6 (patch)
tree431a69d7a9300f45ccbf2638367fca39f7c8b257 /arch/Kconfig
parent0145eed6ed3210f98b366e88363553251c41807d (diff)
f2fs: Add error handling for negative returns from do_garbage_collect
The function do_garbage_collect can return a value less than 0 due to f2fs_cp_error being true or page allocation failure, as a result of calling f2fs_get_sum_page. However, f2fs_gc does not account for such cases, which could potentially lead to an abnormal total_freed and thus cause subsequent code to behave unexpectedly. Given that an f2fs_cp_error is irrecoverable, and considering that do_garbage_collect already retries page allocation errors through its call to f2fs_get_sum_page->f2fs_get_meta_page_retry, any error reported by do_garbage_collect should immediately terminate the current GC. Signed-off-by: Yongpeng Yang <yangyongpeng1@oppo.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'arch/Kconfig')
0 files changed, 0 insertions, 0 deletions