/* the function goes through all block freed in the group but not yet committed and marks them used in in-core bitmap. buddy must be generated from this bitmap Need to be called with the ext4 group lock held  */
static void ext4_mb_generate_from_freelist(struct super_block *sb, void *bitmap, ext4_group_t group)
/* the function goes through all block freed in the group but not yet committed and marks them used in in-core bitmap. buddy must be generated from this bitmap Need to be called with the ext4 group lock held  */
static void ext4_mb_generate_from_freelist(struct super_block *sb, void *bitmap, ext4_group_t group)
{
	struct rb_node *n;
	struct ext4_group_info *grp;
	struct ext4_free_data *entry;
	grp = ext4_get_group_info(sb, group);
	n = rb_first(&(grp->bb_free_root));
	while (n) {
		entry = rb_entry(n, struct ext4_free_data, node);
		mb_set_bits(bitmap, entry->start_blk, entry->count);
		n = rb_next(n);
	}
	return;
}