]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
f2fs: check curseg->inited before write_sum_page in change_curseg
authorYongpeng Yang <yangyongpeng1@oppo.com>
Mon, 21 Oct 2024 04:48:01 +0000 (12:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:05 +0000 (19:51 +0100)
commit4bd3d783be929a2f0622b1381e9810b3dd3f55a7
tree25e052bc9f8d6235741c3a0387b2aa22cd8c903f
parenta76172963ea2c03f4e9f3ae44b432a9110efdc65
f2fs: check curseg->inited before write_sum_page in change_curseg

[ Upstream commit 43563069e1c1df417d2eed6eca8a22fc6b04691d ]

In the __f2fs_init_atgc_curseg->get_atssr_segment calling,
curseg->segno is NULL_SEGNO, indicating that there is no summary
block that needs to be written.

Fixes: 093749e296e2 ("f2fs: support age threshold based garbage collection")
Signed-off-by: Yongpeng Yang <yangyongpeng1@oppo.com>
Reviewed-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