Let's fix the wrong start offset of cp_payload blocks in
fix_checkpoint().
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
ASSERT(ret >= 0);
for (i = 0; i < get_sb(cp_payload); i++) {
- ret = dev_write_block(((unsigned char *)cp) + i * F2FS_BLKSIZE,
- cp_blk_no++);
+ ret = dev_write_block(((unsigned char *)cp) +
+ (i + 1) * F2FS_BLKSIZE, cp_blk_no++);
ASSERT(ret >= 0);
}