/* if there was an error for whatever reason after calling btrfs_check_data_free_space, call this so we can cleanup the counters.  */
void btrfs_free_reserved_data_space(struct btrfs_root *root, struct inode *inode, u64 bytes)
/* if there was an error for whatever reason after calling btrfs_check_data_free_space, call this so we can cleanup the counters.  */
void btrfs_free_reserved_data_space(struct btrfs_root *root, struct inode *inode, u64 bytes)
{
	struct btrfs_space_info *data_sinfo;
	bytes = (bytes + root->sectorsize - 1) & ~((u64)root->sectorsize - 1);
	data_sinfo = BTRFS_I(inode)->space_info;
	spin_lock(&data_sinfo->lock);
	data_sinfo->bytes_may_use -= bytes;
	BTRFS_I(inode)->reserved_bytes -= bytes;
	spin_unlock(&data_sinfo->lock);
}