]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/lease: Drop recursive leads checks
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 28 Feb 2019 14:49:05 +0000 (15:49 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 24 Apr 2019 09:28:31 +0000 (11:28 +0200)
We disallow subleasing, so no point checking whether the master holds
all the leases - it will.

Spotted while typing exhaustive igt coverage for all these corner
cases.

Cc: Keith Packard <keithp@keithp.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190228144910.26488-3-daniel.vetter@ffwll.ch
drivers/gpu/drm/drm_lease.c

index 1176d814cf7f9412e002177ff61d4383f5bb3248..cce5d9dd52ffff65b516bdb035a839110b629fcb 100644 (file)
@@ -220,8 +220,6 @@ static struct drm_master *drm_lease_create(struct drm_master *lessor, struct idr
                error = 0;
                if (!idr_find(&dev->mode_config.object_idr, object))
                        error = -ENOENT;
-               else if (!_drm_lease_held_master(lessor, object))
-                       error = -EACCES;
                else if (_drm_has_leased(lessor, object))
                        error = -EBUSY;