Change ext2fs_block_alloc_stats2() so that when a cluster is
allocated, the free blocks counter in the superblock is appropriately
decremented by the cluster size.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
ext2fs_bg_flags_clear(fs, group, EXT2_BG_BLOCK_UNINIT);
ext2fs_group_desc_csum_set(fs, group);
- ext2fs_free_blocks_count_add(fs->super, -inuse);
+ ext2fs_free_blocks_count_add(fs->super,
+ -inuse * EXT2FS_CLUSTER_RATIO(fs));
ext2fs_mark_super_dirty(fs);
ext2fs_mark_bb_dirty(fs);
if (fs->block_alloc_stats)