This patch fixes max_nat_bitmap_size miscalculatation

Signed-off-by: Gao Xiang <[email protected]>
---
 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


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to