From: Maxime Ripard Date: Tue, 3 Jan 2023 07:32:12 +0000 (+0100) Subject: Merge drm/drm-fixes into drm-misc-fixes X-Git-Tag: v6.2-rc3~9^2~2^2~1 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=2c55d703391acf7e9101da596d0c15ee03b318a3;p=tomoyo%2Ftomoyo-test1.git Merge drm/drm-fixes into drm-misc-fixes Let's start the fixes cycle. Signed-off-by: Maxime Ripard --- 2c55d703391acf7e9101da596d0c15ee03b318a3 diff --cc drivers/dma-buf/dma-buf.c index eb6b59363c4f,b6c36914e7c6..e6528767efc7 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@@ -655,24 -658,23 +660,23 @@@ struct dma_buf *dma_buf_export(const st init_waitqueue_head(&dmabuf->poll); dmabuf->cb_in.poll = dmabuf->cb_out.poll = &dmabuf->poll; dmabuf->cb_in.active = dmabuf->cb_out.active = 0; - mutex_init(&dmabuf->lock); + INIT_LIST_HEAD(&dmabuf->attachments); if (!resv) { - resv = (struct dma_resv *)&dmabuf[1]; - dma_resv_init(resv); + dmabuf->resv = (struct dma_resv *)&dmabuf[1]; + dma_resv_init(dmabuf->resv); + } else { + dmabuf->resv = resv; } - dmabuf->resv = resv; - file = dma_buf_getfile(dmabuf, exp_info->flags); - if (IS_ERR(file)) { - ret = PTR_ERR(file); + ret = dma_buf_stats_setup(dmabuf, file); + if (ret) goto err_dmabuf; - } + file->private_data = dmabuf; + file->f_path.dentry->d_fsdata = dmabuf; dmabuf->file = file; - INIT_LIST_HEAD(&dmabuf->attachments); - mutex_lock(&db_list.lock); list_add(&dmabuf->list_node, &db_list.head); mutex_unlock(&db_list.lock);