Commit 5335bfc6 authored by Jack Qiu's avatar Jack Qiu Committed by Jaegeuk Kim
Browse files

f2fs: init dirty_secmap incorrectly



section is dirty, but dirty_secmap may not set

Reported-by: default avatarJia Yang <jiayang5@huawei.com>
Fixes: da52f8ad ("f2fs: get the right gc victim section when section has several segments")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarJack Qiu <jack.qiu@huawei.com>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent b876f4c9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4551,7 +4551,7 @@ static void init_dirty_segmap(struct f2fs_sb_info *sbi)
		return;

	mutex_lock(&dirty_i->seglist_lock);
	for (segno = 0; segno < MAIN_SECS(sbi); segno += blks_per_sec) {
	for (segno = 0; segno < MAIN_SEGS(sbi); segno += sbi->segs_per_sec) {
		valid_blocks = get_valid_blocks(sbi, segno, true);
		secno = GET_SEC_FROM_SEG(sbi, segno);