[Intel-gfx] [PATCH] drm/i915: Unreference object, not handle
Owain Ainsworth
zerooa at googlemail.com
Wed May 27 18:58:46 CEST 2009
On Wed, May 27, 2009 at 05:36:49PM +0200, Jonas Bonn wrote:
> The newly created handle should not be unreferenced here, just the object
> that the handle points to.
>
> Signed-off-by: Jonas Bonn <jonas at southpole.se>
> ---
> drivers/gpu/drm/i915/i915_gem.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 717b6a8..97a17a8 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -123,7 +123,7 @@ i915_gem_create_ioctl(struct drm_device *dev, void *data,
>
> ret = drm_gem_handle_create(file_priv, obj, &handle);
> mutex_lock(&dev->struct_mutex);
> - drm_gem_object_handle_unreference(obj);
> + drm_gem_object_unreference(obj);
> mutex_unlock(&dev->struct_mutex);
I've had something like this in my bsd tree for a while. I'm not sure if
the problem is that krefs default to one reference already though
(making a handle dereference mostly correct).
-0-
--
The economy depends about as much on economists as the weather does on
weather forecasters.
-- Jean-Paul Kauffmann
More information about the Intel-gfx
mailing list