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)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 4 Mar 2024 17:51:51 +0000 (09:51 -0800)
commit7324858237829733dec9c670170df2377c5ca6e2
tree4854011d3ec2ff605edd43d6d56bfd0e66ebcced
parent9ddabae70a67b6fd6d5c7f96dba95a7ce26e7dce
f2fs: fix to use correct segment type in f2fs_allocate_data_block()

@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>
fs/f2fs/segment.c