diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index aa9ad85e0901..17d1723d98a0 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -373,7 +373,8 @@ static inline unsigned int get_ckpt_valid_blocks(struct f2fs_sb_info *sbi, unsigned int segno, bool use_section) { if (use_section && __is_large_section(sbi)) { - unsigned int start_segno = START_SEGNO(segno); + unsigned int secno = GET_SEC_FROM_SEG(sbi, segno); + unsigned int start_segno = GET_SEG_FROM_SEC(sbi, secno); unsigned int blocks = 0; int i;