From 6471969f785854a51d59fe9e5ee926b863cd28f9 Mon Sep 17 00:00:00 2001 From: Sheng Yong Date: Mon, 24 Oct 2016 10:16:04 +0800 Subject: [PATCH] fsck.f2fs: do not check the first seg in a sec in find_next_free_block The first segment is already checked, so there is no need to check it again if we want to make sure the whole section is freed. Signed-off-by: Sheng Yong Signed-off-by: Jaegeuk Kim --- fsck/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsck/mount.c b/fsck/mount.c index ca7f6dd..0a47bf7 100644 --- a/fsck/mount.c +++ b/fsck/mount.c @@ -1573,7 +1573,7 @@ int find_next_free_block(struct f2fs_sb_info *sbi, u64 *to, int left, int type) struct seg_entry *se2; unsigned int i; - for (i = 0; i < sbi->segs_per_sec; i++) { + for (i = 1; i < sbi->segs_per_sec; i++) { se2 = get_seg_entry(sbi, segno + i); if (se2->valid_blocks) break; -- 2.7.4