From 6f468feef2f2531f1ed06a9211c1a875391b4e4c Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Thu, 2 Sep 2021 13:43:56 -0400 Subject: [PATCH] i915: Use the maple tree iterator for vdso Remove the use of the vma linked list in favour of mas_for_each() Signed-off-by: Liam R. Howlett --- drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c index 8ea0fa665e530..a67d62159e5b8 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c @@ -423,11 +423,12 @@ static int probe_range(struct mm_struct *mm, unsigned long addr, unsigned long len) { const unsigned long end = addr + len; + MA_STATE(mas, &mm->mm_mt, addr, addr); struct vm_area_struct *vma; int ret = -EFAULT; mmap_read_lock(mm); - for (vma = find_vma(mm, addr); vma; vma = vma->vm_next) { + mas_for_each(&mas, vma, ULONG_MAX) { /* Check for holes, note that we also update the addr below */ if (vma->vm_start > addr) break; -- 2.50.1