/* 64-bit file support on 64-bit platforms by Jakub Jelinek ( */
static int ext3_release_file(struct inode *inode, struct file *filp)
/* 64-bit file support on 64-bit platforms by Jakub Jelinek ( */
static int ext3_release_file(struct inode *inode, struct file *filp)
{
	if (EXT3_I(inode)->i_state & EXT3_STATE_FLUSH_ON_CLOSE) {
		filemap_flush(inode->i_mapping);
		EXT3_I(inode)->i_state &= ~EXT3_STATE_FLUSH_ON_CLOSE;
	}
	if ((filp->f_mode & FMODE_WRITE) &&
			(atomic_read(&inode->i_writecount) == 1))
	{
		mutex_lock(&EXT3_I(inode)->truncate_mutex);
		ext3_discard_reservation(inode);
		mutex_unlock(&EXT3_I(inode)->truncate_mutex);
	}
	if (is_dx(inode) && filp->private_data)
		ext3_htree_free_dir_info(filp->private_data);
	return 0;
}