From 283eaa25594347267df4e6e5eedbb9d17bb3682c Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 31 Jul 2007 09:22:45 +1000 Subject: 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. --- linux-core/drm_fence.c | 3 +-- 1 file changed, 1 insertion(+), 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); -- cgit v1.2.3