We should avoid i==j, otherwise we always assign 0~5 segments.
Signed-off-by: Jaegeuk Kim <[email protected]>
---
mkfs/f2fs_format.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
index b379e80..219c2a7 100644
--- a/mkfs/f2fs_format.c
+++ b/mkfs/f2fs_format.c
@@ -123,7 +123,7 @@ static void verify_cur_segs(void)
for (i = 0; i < NR_CURSEG_TYPE; i++) {
for (j = 0; j < NR_CURSEG_TYPE; j++)
- if (c.cur_seg[i] == c.cur_seg[j])
+ if (i != j && c.cur_seg[i] == c.cur_seg[j])
break;
}
--
2.14.0.rc1.383.gd1ce394fe2-goog
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel