This patch fixes max_nat_bitmap_size miscalculatation Signed-off-by: Gao Xiang <gaoxiang25@xxxxxxxxxx> --- fsck/resize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsck/resize.c b/fsck/resize.c index 6c3eeab..4f3844c 100644 --- a/fsck/resize.c +++ b/fsck/resize.c @@ -61,7 +61,7 @@ static int get_new_sb(struct f2fs_super_block *sb) * When sit is too large, we should expand cp area. It requires more pages for cp. */ if (max_sit_bitmap_size > - (CHECKSUM_OFFSET - sizeof(struct f2fs_checkpoint) + 65)) { + (CHECKSUM_OFFSET - sizeof(struct f2fs_checkpoint) + 1 - 64)) { max_nat_bitmap_size = CHECKSUM_OFFSET - sizeof(struct f2fs_checkpoint) + 1; set_sb(cp_payload, F2FS_BLK_ALIGN(max_sit_bitmap_size)); } else { -- 2.1.4