static void mbochs_release_dmabuf(struct dma_buf *buf)
{
	struct mbochs_dmabuf *dmabuf = buf->priv;
	struct mdev_state *mdev_state = dmabuf->mdev_state;
	struct device *dev = mdev_dev(mdev_state->mdev);
	pgoff_t pg;

	dev_dbg(dev, "%s: %d\n", __func__, dmabuf->id);

	for (pg = 0; pg < dmabuf->pagecount; pg++)
		put_page(dmabuf->pages[pg]);

	mutex_lock(&mdev_state->ops_lock);
	dmabuf->buf = NULL;
	if (dmabuf->unlinked)
		kfree(dmabuf);
	mutex_unlock(&mdev_state->ops_lock);
}
static void mbochs_release_dmabuf(struct dma_buf *buf)
{
	struct mbochs_dmabuf *dmabuf = buf->priv;
	struct mdev_state *mdev_state = dmabuf->mdev_state;
	struct device *dev = mdev_dev(mdev_state->mdev);
	pgoff_t pg;

	dev_dbg(dev, "%s: %d\n", __func__, dmabuf->id);

	for (pg = 0; pg < dmabuf->pagecount; pg++)
		put_page(dmabuf->pages[pg]);

	mutex_lock(&mdev_state->ops_lock);
	dmabuf->buf = NULL;
	if (dmabuf->unlinked)
		kfree(dmabuf);
	mutex_unlock(&mdev_state->ops_lock);
}