All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mkfs.f2fs: fix wrong curseg check
@ 2017-08-26  0:10 Jaegeuk Kim
  2017-08-28  9:47 ` Chao Yu
  0 siblings, 1 reply; 5+ messages in thread
From: Jaegeuk Kim @ 2017-08-26  0:10 UTC (permalink / raw)
  To: linux-f2fs-devel; +Cc: Jaegeuk Kim

We should avoid i==j, otherwise we always assign 0~5 segments.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-09-06  3:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-26  0:10 [PATCH] mkfs.f2fs: fix wrong curseg check Jaegeuk Kim
2017-08-28  9:47 ` Chao Yu
2017-09-05 12:43   ` Chao Yu
2017-09-05 17:47     ` Jaegeuk Kim
2017-09-06  3:41       ` Chao Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.