aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Qiu2020-12-01 01:45:47 -0600
committerJaegeuk Kim2020-12-21 15:33:16 -0600
commitd86ac27d3715a2d714732d5ac798752b89049502 (patch)
tree2eb53e768446a834f17c892fc40cffff8800f5a8
parentecc8b5c902bed99a0fd158082a839100b2231ed7 (diff)
downloadkernel-d86ac27d3715a2d714732d5ac798752b89049502.tar.gz
kernel-d86ac27d3715a2d714732d5ac798752b89049502.tar.xz
kernel-d86ac27d3715a2d714732d5ac798752b89049502.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>
-rw-r--r--fs/f2fs/segment.c2
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)
4551 return; 4551 return;
4552 4552
4553 mutex_lock(&dirty_i->seglist_lock); 4553 mutex_lock(&dirty_i->seglist_lock);
4554 for (segno = 0; segno < MAIN_SECS(sbi); segno += blks_per_sec) { 4554 for (segno = 0; segno < MAIN_SEGS(sbi); segno += sbi->segs_per_sec) {
4555 valid_blocks = get_valid_blocks(sbi, segno, true); 4555 valid_blocks = get_valid_blocks(sbi, segno, true);
4556 secno = GET_SEC_FROM_SEG(sbi, segno); 4556 secno = GET_SEC_FROM_SEG(sbi, segno);
4557 4557