/* Insert extents into the leaf block. The extent (@o_start) is overwritten by inserted extents.  */
static void mext_insert_inside_block(struct ext4_extent *o_start, struct ext4_extent *o_end, struct ext4_extent *start_ext, struct ext4_extent *new_ext, struct ext4_extent *end_ext, struct ext4_extent_header *eh, int range_to_move)
/* Insert extents into the leaf block. The extent (@o_start) is overwritten by inserted extents.  */
static void mext_insert_inside_block(struct ext4_extent *o_start, struct ext4_extent *o_end, struct ext4_extent *start_ext, struct ext4_extent *new_ext, struct ext4_extent *end_ext, struct ext4_extent_header *eh, int range_to_move)
{
	int i = 0;
	unsigned long len;
	if (range_to_move && o_end < EXT_LAST_EXTENT(eh)) {
		len = (unsigned long)(EXT_LAST_EXTENT(eh) + 1) -
			(unsigned long)(o_end + 1);
		memmove(o_end + 1 + range_to_move, o_end + 1, len);
	}
	if (start_ext->ee_len)
		o_start[i++].ee_len = start_ext->ee_len;
	if (new_ext->ee_len) {
		o_start[i] = *new_ext;
		ext4_ext_store_pblock(&o_start[i++], ext_pblock(new_ext));
	}
	if (end_ext->ee_len)
		o_start[i] = *end_ext;
	le16_add_cpu(&eh->eh_entries, range_to_move);
}