/* This is nasty and subtle: ext3_write_begin() could have allocated blocks for the whole page but later we failed to copy the data in. Update inode size according to what we managed to copy. The rest is going to be truncated in write_end function.  */
static void update_file_sizes(struct inode *inode, loff_t pos, unsigned copied)
/* This is nasty and subtle: ext3_write_begin() could have allocated blocks for the whole page but later we failed to copy the data in. Update inode size according to what we managed to copy. The rest is going to be truncated in write_end function.  */
static void update_file_sizes(struct inode *inode, loff_t pos, unsigned copied)
{
	if (pos + copied > inode->i_size)
		i_size_write(inode, pos + copied);
	if (pos + copied > EXT3_I(inode)->i_disksize) {
		EXT3_I(inode)->i_disksize = pos + copied;
		mark_inode_dirty(inode);
	}
}