/* We are freeing all blocks refered from that array (numbers are stored as little-endian 32-bit) and updating @inode->i_blocks appropriately.  */
static void ext2_free_data(struct inode *inode, __le32 *p, __le32 *q)
/* We are freeing all blocks refered from that array (numbers are stored as little-endian 32-bit) and updating @inode->i_blocks appropriately.  */
static void ext2_free_data(struct inode *inode, __le32 *p, __le32 *q)
{
	unsigned long block_to_free = 0, count = 0;
	unsigned long nr;
	for ( ; p < q ; p++) {
		nr = le32_to_cpu(*p);
		if (nr) {
			*p = 0;
			if (count == 0)
				goto free_this;
			else if (block_to_free == nr - count)
				count++;
			else {
				mark_inode_dirty(inode);
				ext2_free_blocks (inode, block_to_free, count);
			free_this:
				block_to_free = nr;
				count = 1;
			}
		}
	}
	if (count > 0) {
		mark_inode_dirty(inode);
		ext2_free_blocks (inode, block_to_free, count);
	}
}