diff mbox series

[v3,64/66] i915: Use the maple tree iterator for vdso

Message ID 20211005012959.1110504-65-Liam.Howlett@oracle.com (mailing list archive)
State New
Headers show
Series Introducing the Maple Tree | expand

Commit Message

Liam R. Howlett Oct. 5, 2021, 1:31 a.m. UTC
Remove the use of the vma linked list in favour of mas_for_each()

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

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;