From: Yunlong Song Date: Tue, 30 Oct 2018 12:37:55 +0000 (+0800) Subject: f2fs: change segment to section in f2fs_ioc_gc_range X-Git-Tag: v4.19.89~150 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=313f1fef6650b76d194b2e9071aa64b43194b0c4;p=thirdparty%2Fkernel%2Fstable.git f2fs: change segment to section in f2fs_ioc_gc_range [ Upstream commit 67b0e42b768c9ddc3fd5ca1aee3db815cfaa635c ] f2fs_ioc_gc_range skips blocks_per_seg each time, however, f2fs_gc moves blocks of section each time, so fix it from segment to section. Signed-off-by: Yunlong Song Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 187bf7e260c99..5eef2a8b29ab6 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -2143,7 +2143,7 @@ do_more: } ret = f2fs_gc(sbi, range.sync, true, GET_SEGNO(sbi, range.start)); - range.start += sbi->blocks_per_seg; + range.start += BLKS_PER_SEC(sbi); if (range.start <= end) goto do_more; out: