]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
f2fs: fix to use correct segment type in f2fs_allocate_data_block()
authorChao Yu <chao@kernel.org>
Sun, 25 Feb 2024 06:36:28 +0000 (14:36 +0800)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:20:02 +0000 (18:20 -0400)
commite690dddae437221b0d524a73b65617597c96b751
tree7d8a2172f6767397ea83f08ebbf147dcb22b2aea
parent490510e6082f4a57a4301b0f688699d5dd9b64d4
f2fs: fix to use correct segment type in f2fs_allocate_data_block()

[ Upstream commit 7324858237829733dec9c670170df2377c5ca6e2 ]

@type in f2fs_allocate_data_block() indicates log header's type, it
can be CURSEG_COLD_DATA_PINNED or CURSEG_ALL_DATA_ATGC, rather than
type of data/node, however IS_DATASEG()/IS_NODESEG() only accept later
one, fix it.

Fixes: 093749e296e2 ("f2fs: support age threshold based garbage collection")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/f2fs/segment.c