From: Liam R. Howlett Date: Thu, 2 Sep 2021 17:43:56 +0000 (-0400) Subject: i915: Use the maple tree iterator for vdso X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=bd6371c00e10333c865ba54db8b1975fcc9111fb;p=users%2Fjedix%2Flinux-maple.git 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 --- diff --git a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c index 8ea0fa665e53..a67d62159e5b 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;