f2fs: fix to check return value of f2fs_gc_range
authorZhiguo Niu <zhiguo.niu@unisoc.com>
Fri, 1 Mar 2024 08:25:55 +0000 (16:25 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 4 Mar 2024 17:52:58 +0000 (09:52 -0800)
commit22af1b8c31cbf7daf235a4fcb975089ad8c07fbe
tree008fc570682c9d337c6677d1f02fcc7eca6bbd4b
parent28f66cc654039edff3e34200c3357d92a7c4d272
f2fs: fix to check return value of f2fs_gc_range

f2fs_gc_range may return error, so its caller
f2fs_allocate_pinning_section should determine whether
to do retry based on ist return value.

Also just do f2fs_gc_range when f2fs_allocate_new_section
return -EAGAIN, and check cp error case in f2fs_gc_range.

Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/gc.c
fs/f2fs/segment.c