fsck.f2fs: calculate orphan_blkaddr correctly
Commit 4ea4f1db ("fsck.f2fs: large volume support") added the support
for large volume over about 3TB. The "cp_payload" is added to start_blk,
but not removed from orphan_blkaddr.
Fixes: 4ea4f1db ("fsck.f2fs: large volume support")
Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
diff --git a/fsck/fsck.c b/fsck/fsck.c
index aaaa95b..c68eae7 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -1474,7 +1474,7 @@
return;
start_blk = __start_cp_addr(sbi) + 1 + get_sb(cp_payload);
- orphan_blkaddr = __start_sum_addr(sbi) - 1;
+ orphan_blkaddr = __start_sum_addr(sbi) - 1 - get_sb(cp_payload);
orphan_blk = calloc(BLOCK_SZ, 1);
ASSERT(orphan_blk);