drm/i915/selftests: Unwind hugepages to drop wakeref on error
authorjsg <jsg@openbsd.org>
Thu, 2 Feb 2023 03:49:58 +0000 (03:49 +0000)
committerjsg <jsg@openbsd.org>
Thu, 2 Feb 2023 03:49:58 +0000 (03:49 +0000)
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

index a491274..6fe080a 100644 (file)
@@ -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);