f2fs: avoid duplicated codes for cleanup
authorChao Yu <yuchao0@huawei.com>
Tue, 13 Apr 2021 09:56:18 +0000 (17:56 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 13 Apr 2021 17:43:15 +0000 (10:43 -0700)
commit453e2ff8e4ff2747acee1799e7ef959970c5cc78
treebfc3b29aac76c61f26bb01c592abe0908f9b6e09
parent38740707c5bc1253069eb932bc6d244f80ec21f0
f2fs: avoid duplicated codes for cleanup

f2fs_segment_has_free_slot() was copied and modified from
__next_free_blkoff(), they are almost the same, clean up to
reuse common code as much as possible.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c