summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2007-07-31 09:22:45 +1000
committerDave Airlie <airlied@redhat.com>2007-07-31 09:25:51 +1000
commit283eaa25594347267df4e6e5eedbb9d17bb3682c (patch)
treea592bd288a27033823fc9c1d4a4fa5b18bbc973a /linux-core
parentf01026eae69e81ae16a69a014ba3bcfb286fc7a4 (diff)
drm: fix fencing refcount error
This extra increase was causing fence leaks on my system, due to create/user add already increasing it twice no need for a 3rd go.
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_fence.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/linux-core/drm_fence.c b/linux-core/drm_fence.c
index c4f7da15..fdb2a4db 100644
--- a/linux-core/drm_fence.c
+++ b/linux-core/drm_fence.c
@@ -597,7 +597,6 @@ int drm_fence_create_ioctl(struct drm_device *dev, void *data, struct drm_file *
* usage > 0. No need to lock dev->struct_mutex;
*/
- atomic_inc(&fence->usage);
arg->handle = fence->base.hash.key;
read_lock_irqsave(&fm->lock, flags);
@@ -830,7 +829,7 @@ int drm_fence_buffers_ioctl(struct drm_device *dev, void *data, struct drm_file
DRM_FENCE_FLAG_SHAREABLE);
if (ret)
return ret;
- atomic_inc(&fence->usage);
+
arg->handle = fence->base.hash.key;
read_lock_irqsave(&fm->lock, flags);