]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
f2fs: open code allocate_segment_by_default
authorChristoph Hellwig <hch@lst.de>
Mon, 28 Nov 2022 09:43:45 +0000 (10:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:05 +0000 (19:51 +0100)
commit6bd8aa76978df733d044b484eee7f31ce90e054a
treef969a306ff2beed893bc329f65370d538c0e19b8
parent634ffe866196ffd0abab800a0883d835eff79d59
f2fs: open code allocate_segment_by_default

[ Upstream commit 8442d94b8ac8d5d8300725a9ffa9def526b71170 ]

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: 43563069e1c1 ("f2fs: check curseg->inited before write_sum_page in change_curseg")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/f2fs/segment.c