From 85f9e02430818414086568ca464c4123b0e0d562 Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 2 Feb 2023 03:49:58 +0000 Subject: [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error From Chris Wilson d5fb544b4ce56316bdfd542511dcd34c5798c3b8 in linux-6.1.y/6.1.9 93eea624526fc7d070cdae463408665824075f54 in mainline linux --- sys/dev/pci/drm/i915/gem/selftests/huge_pages.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/pci/drm/i915/gem/selftests/huge_pages.c b/sys/dev/pci/drm/i915/gem/selftests/huge_pages.c index a4912749d4d..6fe080abd73 100644 --- a/sys/dev/pci/drm/i915/gem/selftests/huge_pages.c +++ b/sys/dev/pci/drm/i915/gem/selftests/huge_pages.c @@ -1697,7 +1697,7 @@ static int igt_shrink_thp(void *arg) I915_SHRINK_ACTIVE); i915_vma_unpin(vma); if (err) - goto out_put; + goto out_wf; /* * Now that the pages are *unpinned* shrinking should invoke @@ -1713,19 +1713,19 @@ static int igt_shrink_thp(void *arg) pr_err("unexpected pages mismatch, should_swap=%s\n", str_yes_no(should_swap)); err = -EINVAL; - goto out_put; + goto out_wf; } if (should_swap == (obj->mm.page_sizes.sg || obj->mm.page_sizes.phys)) { pr_err("unexpected residual page-size bits, should_swap=%s\n", str_yes_no(should_swap)); err = -EINVAL; - goto out_put; + goto out_wf; } err = i915_vma_pin(vma, 0, 0, flags); if (err) - goto out_put; + goto out_wf; while (n--) { err = cpu_check(obj, n, 0xdeadbeaf); -- 2.20.1