diff options
author | 2020-12-01 15:45:47 +0800 | |
---|---|---|
committer | 2020-12-02 22:00:23 -0800 | |
commit | 5335bfc6eb688344bfcd4b4133c002c0ae0d0719 (patch) | |
tree | 63f83c721089f4363a46b8af5251695906504aa0 /fs/f2fs | |
parent | f2fs: remove buffer_head which has 32bits limit (diff) | |
download | linux-5335bfc6eb688344bfcd4b4133c002c0ae0d0719.tar.gz linux-5335bfc6eb688344bfcd4b4133c002c0ae0d0719.tar.bz2 linux-5335bfc6eb688344bfcd4b4133c002c0ae0d0719.zip |
f2fs: init dirty_secmap incorrectly
section is dirty, but dirty_secmap may not set
Reported-by: Jia Yang <jiayang5@huawei.com>
Fixes: da52f8ade40b ("f2fs: get the right gc victim section when section has several segments")
Cc: <stable@vger.kernel.org>
Signed-off-by: Jack Qiu <jack.qiu@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/segment.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index d9e2e656764d..bfc597037413 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -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); |