If the segment type is not matched, goto next segment to save time.
---
 fsck/mount.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fsck/mount.c b/fsck/mount.c
index 00940b8..dccaae2 100644
--- a/fsck/mount.c
+++ b/fsck/mount.c
@@ -2854,6 +2854,8 @@ next_segment:
                if (type == want_type && !new_sec &&
                        !f2fs_test_bit(offset, (const char *)bitmap))
                        return 0;
+               if (type != want_type)
+                       goto next_segment;
 
                *to = left ? *to - 1: *to + 1;
        }
-- 
2.25.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to