f2fs: open code allocate_segment_by_default
[ Upstream commit 8442d94b ] 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> Stable-dep-of: 43563069 ("f2fs: check curseg->inited before write_sum_page in change_curseg") Signed-off-by:
Sasha Levin <sashal@kernel.org>
Loading