]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm: Convert vma_lookup() to use the Maple Tree
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 29 Oct 2021 01:53:09 +0000 (21:53 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 26 Nov 2021 19:50:28 +0000 (14:50 -0500)
Unlike the rbtree, the Maple Tree will return a NULL if there's
nothing at a particular address.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
include/linux/mm.h

index 4d5ab70b1f6d60ad60546ae1efbe0b032eab59f0..c28bd97a4ecdbd000405ae42c151306a95fc10dd 100644 (file)
@@ -2845,12 +2845,7 @@ struct vm_area_struct *find_vma_intersection(struct mm_struct *mm,
 static inline
 struct vm_area_struct *vma_lookup(struct mm_struct *mm, unsigned long addr)
 {
-       struct vm_area_struct *vma = find_vma(mm, addr);
-
-       if (vma && addr < vma->vm_start)
-               vma = NULL;
-
-       return vma;
+       return mtree_load(&mm->mm_mt, addr);
 }
 
 static inline unsigned long vm_start_gap(struct vm_area_struct *vma)