]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Add find_vma_intersection to nommu
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 25 Feb 2022 01:36:58 +0000 (20:36 -0500)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 8 Mar 2022 18:19:14 +0000 (13:19 -0500)
Add this to 387dca4a26d4a

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
mm/nommu.c

index 948393927325ff99770a2f87469aacc1041b2385..8b801f5c9ef9c54e3ebe58f8675a68624818d40c 100644 (file)
@@ -610,6 +610,17 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
        vm_area_free(vma);
 }
 
+struct vm_area_struct *find_vma_intersection(struct mm_struct *mm,
+                                            unsigned long start_addr,
+                                            unsigned long end_addr)
+{
+       unsigned long index = start_addr;
+
+       mmap_assert_locked(mm);
+       return mt_find(&mm->mm_mt, &index, end_addr - 1);
+}
+EXPORT_SYMBOL(find_vma_intersection);
+
 /*
  * look up the first VMA in which addr resides, NULL if none
  * - should be called with mm->mmap_lock at least held readlocked