From d2578e7f3b21426fec88710373fd50f96717a4c2 Mon Sep 17 00:00:00 2001 From: kfx Date: Wed, 9 May 2012 16:16:34 +0800 Subject: [PATCH] ion: update ion drivers --- drivers/gpu/ion/ion.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/ion/ion.c b/drivers/gpu/ion/ion.c index b76d61fe8921..1d1744570b84 100755 --- a/drivers/gpu/ion/ion.c +++ b/drivers/gpu/ion/ion.c @@ -166,8 +166,8 @@ static void ion_buffer_destroy(struct kref *kref) struct ion_buffer *buffer = container_of(kref, struct ion_buffer, ref); struct ion_device *dev = buffer->dev; - buffer->heap->ops->free(buffer); mutex_lock(&dev->lock); + buffer->heap->ops->free(buffer); rb_erase(&buffer->node, &dev->buffers); mutex_unlock(&dev->lock); kfree(buffer); @@ -815,6 +815,7 @@ static void ion_vma_close(struct vm_area_struct *vma) /* this indicates the client is gone, nothing to do here */ if (!handle) return; + vma->vm_private_data = NULL; client = handle->client; pr_debug("%s: %d client_cnt %d handle_cnt %d alloc_cnt %d\n", __func__, __LINE__, -- 2.34.1