ext2_ino_t ino;
unsigned int group = 0;
unsigned int count = 0;
- int total_free = 0;
+ blk64_t total_blocks_free = 0;
+ int total_inodes_free = 0;
int group_free = 0;
int uninit = 0;
blk64_t super_blk, old_desc_blk, new_desc_blk;
+ fs->inode_blocks_per_group))))) ||
(!ext2fs_fast_test_block_bitmap2(fs->block_map, blk))) {
group_free++;
- total_free++;
+ total_blocks_free++;
}
count++;
if ((count == fs->super->s_blocks_per_group) ||
fs->super->s_reserved_gdt_blocks;
}
}
- ext2fs_free_blocks_count_set(fs->super, total_free);
+ ext2fs_free_blocks_count_set(fs->super, total_blocks_free);
/*
* Next, calculate the inode statistics
*/
group_free = 0;
- total_free = 0;
count = 0;
group = 0;
if (uninit ||
!ext2fs_fast_test_inode_bitmap2(fs->inode_map, ino)) {
group_free++;
- total_free++;
+ total_inodes_free++;
}
count++;
if ((count == fs->super->s_inodes_per_group) ||
uninit = ext2fs_bg_flags_test(fs, group, EXT2_BG_INODE_UNINIT);
}
}
- fs->super->s_free_inodes_count = total_free;
+ fs->super->s_free_inodes_count = total_inodes_free;
ext2fs_mark_super_dirty(fs);
return 0;
}