]> 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>
Thu, 16 Dec 2021 03:01:33 +0000 (22:01 -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>
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
include/linux/mm.h

index 913bff20bd59b89455d3bdfb947f25a6de944952..cf3b31b13bad7fef631d9179a3c243d55cf2be86 100644 (file)
@@ -2849,12 +2849,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)