f2fs: open code allocate_segment_by_default
authorChristoph Hellwig <hch@lst.de>
Mon, 28 Nov 2022 09:43:45 +0000 (10:43 +0100)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 8 Dec 2022 17:32:13 +0000 (09:32 -0800)
commit8442d94b8ac8d5d8300725a9ffa9def526b71170
tree0be951c721ff9d83a2c59b6b6fdaed528ca20234
parent1c8a8ec0a0e9a1176022a35c4daf04fe1594d270
f2fs: open code allocate_segment_by_default

allocate_segment_by_default has just two callers, which use very
different code pathes inside it based on the force paramter.  Just
open code the logic in the two callers using a new helper to decided
if a new segment should be allocated.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c