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 <shengyo...@huawei.com>
---
 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.10.1


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to