From: Yongqiang Yang <xiaoqiangnk@xxxxxxxxx> If the blocks of a filesystem is a multiple of blocks_per_group, blocks of the ending group is computed wrongly. Use the new ext2fs_group_blocks_count() helper instead. Eric Sandeen: Converted to use new blocks per group helper Signed-off-by: Yongqiang Yang <xiaoqiangnk@xxxxxxxxx> --- diff --git a/e2fsck/pass5.c b/e2fsck/pass5.c index f9d746c..2a28c7a 100644 --- a/e2fsck/pass5.c +++ b/e2fsck/pass5.c @@ -225,9 +225,8 @@ redo_counts: count = 0; cmp_block = fs->super->s_clusters_per_group; if (group == (int)fs->group_desc_count - 1) - cmp_block = - EXT2FS_NUM_B2C(fs, - ext2fs_blocks_count(fs->super) % fs->super->s_blocks_per_group); + cmp_block = EXT2FS_NUM_B2C(fs, + ext2fs_group_blocks_count(fs, group)); } bitmap = 0; -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html