Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9290dfd8 authored by Rohit Sekhar's avatar Rohit Sekhar
Browse files

Merge branch 'v1-r' of ssh://gitlab.e.foundation/e/devices/FP4/msm-4.19 into v1-r

parents cc3458a2 81a6bc91
Loading
Loading
Loading
Loading
+17 −4
Original line number Original line Diff line number Diff line
@@ -124,10 +124,6 @@ static void dma_buf_release(struct dentry *dentry)
	 */
	 */
	BUG_ON(dmabuf->cb_shared.active || dmabuf->cb_excl.active);
	BUG_ON(dmabuf->cb_shared.active || dmabuf->cb_excl.active);


	mutex_lock(&db_list.lock);
	list_del(&dmabuf->list_node);
	mutex_unlock(&db_list.lock);

	if (dmabuf->dtor)
	if (dmabuf->dtor)
		dtor_ret = dmabuf->dtor(dmabuf, dmabuf->dtor_data);
		dtor_ret = dmabuf->dtor(dmabuf, dmabuf->dtor_data);


@@ -146,6 +142,22 @@ static void dma_buf_release(struct dentry *dentry)
	dmabuf_dent_put(dmabuf);
	dmabuf_dent_put(dmabuf);
}
}


static int dma_buf_file_release(struct inode *inode, struct file *file)
{
	struct dma_buf *dmabuf;

	if (!is_dma_buf_file(file))
		return -EINVAL;

	dmabuf = file->private_data;

	mutex_lock(&db_list.lock);
	list_del(&dmabuf->list_node);
	mutex_unlock(&db_list.lock);

	return 0;
}

static const struct dentry_operations dma_buf_dentry_ops = {
static const struct dentry_operations dma_buf_dentry_ops = {
       .d_dname = dmabuffs_dname,
       .d_dname = dmabuffs_dname,
       .d_release = dma_buf_release,
       .d_release = dma_buf_release,
@@ -484,6 +496,7 @@ static void dma_buf_show_fdinfo(struct seq_file *m, struct file *file)
}
}


static const struct file_operations dma_buf_fops = {
static const struct file_operations dma_buf_fops = {
	.release	= dma_buf_file_release,
	.mmap		= dma_buf_mmap_internal,
	.mmap		= dma_buf_mmap_internal,
	.llseek		= dma_buf_llseek,
	.llseek		= dma_buf_llseek,
	.poll		= dma_buf_poll,
	.poll		= dma_buf_poll,