]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/mmap: Drop munmap_vma_range()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Wed, 11 Nov 2020 18:32:57 +0000 (13:32 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Wed, 11 Nov 2020 18:35:27 +0000 (13:35 -0500)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
mm/mmap.c

index a234c129bf9e64175fed31671b4098770bc2ecab..31ae3c0468b7c16f15c251886f622e8e96d00c6d 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -479,31 +479,6 @@ static inline struct vm_area_struct *vma_next(struct mm_struct *mm,
        return vma->vm_next;
 }
 
-/*
- * munmap_vma_range() - munmap VMAs that overlap the range.
- * @mm: The mm struct
- * @start: The start of the range.
- * @len: The length of the range.
- * @pprev: pointer to the pointer that will be set to previous vm_area_struct
- *
- * Find all the vm_area_struct that overlap from @start to
- * @end and munmap them.  Set @pprev to the previous vm_area_struct.
- *
- * Returns: -ENOMEM on munmap failure or 0 on success.
- */
-static inline int
-munmap_vma_range(struct mm_struct *mm, unsigned long start, unsigned long len,
-                struct vm_area_struct **pprev, struct list_head *uf)
-{
-       // Needs optimization.
-       while (range_has_overlap(mm, start, start + len, pprev)) {
-               printk("%px %lu-%lu overlap\n", mm, start, start + len);
-               if (do_munmap(mm, start, len, uf))
-                       return -ENOMEM;
-       }
-       return 0;
-}
-
 static unsigned long count_vma_pages_range(struct mm_struct *mm,
                unsigned long addr, unsigned long end)
 {