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.
main
Dave Airlie 2007-07-31 09:22:45 +10:00
parent f01026eae6
commit 283eaa2559
1 changed files with 1 additions and 2 deletions

View File

@ -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);