]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm: Add vma_lookup()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 1 Mar 2021 19:01:06 +0000 (14:01 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 1 Mar 2021 19:01:06 +0000 (14:01 -0500)
Walk the maple tree to find the requested 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 5afa228f04a9107f98b99a06e72878e62df97116..d06743e1e05c50b22124405f59480da48ac57f32 100644 (file)
@@ -2669,6 +2669,13 @@ static inline struct vm_area_struct *vma_prev(struct mm_struct *mm,
        return mas_prev(&mas, 0);
 }
 
+static inline
+struct vm_area_struct *vma_lookup(struct mm_struct *mm, unsigned long addr)
+{
+       return mtree_load(&mm->mm_mt, addr);
+}
+
+
 static inline unsigned long vm_start_gap(struct vm_area_struct *vma)
 {
        unsigned long vm_start = vma->vm_start;