Skip to contentSkip to conversation

resize.f2fs: correct the max segno in migrate_main

PATCH New Junling Zheng 1 participant 1 message Nov 28, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 resize.f2fs: correct the max segno in migrate_main

---
 fsck/resize.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fsck/resize.c +1 -1
index 46aa30e..ba7bb88 100644
@@ -143,7 +143,7 @@ static void migrate_main(struct f2fs_sb_info *sbi,
 
 	ASSERT(raw != NULL);
 
-	for (i = TOTAL_SEGS(sbi); i >= 0; i--) {
+	for (i = TOTAL_SEGS(sbi) - 1; i >= 0; i--) {
 		se = get_seg_entry(sbi, i);
 		if (!se->valid_blocks)
 			continue;
Signature · 4 lines
2.7.4


------------------------------------------------------------------------------