Skip to contentSkip to conversation

fsck.f2fs: fix to check all the types of current offsets

PATCH New Jaegeuk Kim 1 participant 1 message Feb 8, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fsck.f2fs: fix to check all the types of current offsets

We can change the next block offsets sometimes, so we have to check it's free or not all the time. This fixes that SSR type makes a hole for it.

---
 fsck/fsck.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fsck/fsck.c +1 -1
index 29823a1..0a37f7a 100644
@@ -2021,7 +2021,7 @@ int check_curseg_offset(struct f2fs_sb_info *sbi)
 			return -EINVAL;
 		}
 		if (curseg->alloc_type == SSR)
-			return 0;
+			continue;
 
 		nblocks = sbi->blocks_per_seg;
 		for (j = curseg->next_blkoff + 1; j < nblocks; j++) {
Signature · 6 lines
2.15.0.531.g2ccb3012c9-goog


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot