diff options
author | Chanho Park <chanho61.park@samsung.com> | 2014-08-19 21:40:12 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-21 19:12:20 +0900 |
commit | 99e5602bddbd64d188a4fd3eab17931becb239e6 (patch) | |
tree | 6926861b46eb4158d0376b479bc6d233ca317b91 | |
parent | 59f0e7cf56ca8274321165a7504522c51b10cef7 (diff) | |
download | linux-3.10-99e5602bddbd64d188a4fd3eab17931becb239e6.tar.gz linux-3.10-99e5602bddbd64d188a4fd3eab17931becb239e6.tar.bz2 linux-3.10-99e5602bddbd64d188a4fd3eab17931becb239e6.zip |
Revert "dmabuf-sync: remove unnecessary the use of mutex lock."
This reverts commit c75e1e7a03b157842638e55b27f28c41a9a3dc2b.
-rw-r--r-- | drivers/base/dmabuf-sync.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/base/dmabuf-sync.c b/drivers/base/dmabuf-sync.c index fdf3bce61a0..14c0c6f6d42 100644 --- a/drivers/base/dmabuf-sync.c +++ b/drivers/base/dmabuf-sync.c @@ -394,16 +394,19 @@ static int dmabuf_sync_get_obj(struct dmabuf_sync *sync, struct dma_buf *dmabuf, return -ENOMEM; } - get_dma_buf(dmabuf); - sobj->dmabuf = dmabuf; sobj->robj = dmabuf->sync; - sobj->access_type = type; mutex_lock(&sync->lock); list_add_tail(&sobj->head, &sync->syncs); mutex_unlock(&sync->lock); + get_dma_buf(dmabuf); + + mutex_lock(&sobj->robj->lock); + sobj->access_type = type; + mutex_unlock(&sobj->robj->lock); + return 0; } |