]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mmm/mmap: Fix differences after rebase
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Oct 2020 19:19:27 +0000 (15:19 -0400)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Oct 2020 19:19:27 +0000 (15:19 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
mm/mmap.c

index ad63cc7cf3da9584d7431f036b6bdf0549d36d25..3e4c792d15b51056dbcd1385ae54357003f8ecdf 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -497,35 +497,6 @@ munmap_vma_range(struct mm_struct *mm, unsigned long start, unsigned long len,
        return 0;
 }
 
-#if 0
-/* Private
- * clean_overlaps() - Call do_munmap if there exists any mapping within @start
- * to @end.  Sets @pprev to the previous entry or NULL if none exists.
- *
- */
-static int clean_overlaps(struct mm_struct *mm, unsigned long start,
-               unsigned long len, struct vm_area_struct **pprev,
-               struct list_head *uf)
-{
-       struct vm_area_struct *vma;
-       MA_STATE(mas, &mm->mm_mt, start, start);
-
-       *pprev = NULL;
-
-       rcu_read_lock();
-       vma = mas_find(&mas, start + len);
-       if (vma)
-               *pprev = mas_prev(&mas, 0);
-       rcu_read_unlock();
-
-       if (vma) {
-               if (do_munmap(mm, start, len, uf))
-                       return -ENOMEM;
-       }
-       return 0;
-}
-#endif
-
 static unsigned long count_vma_pages_range(struct mm_struct *mm,
                unsigned long addr, unsigned long end)
 {
@@ -2685,7 +2656,7 @@ int __do_munmap(struct mm_struct *mm, unsigned long start, size_t len,
         * unlock any mlock()ed ranges before detaching vmas
         */
        if (mm->locked_vm)
-               unlock_range(vma, end);
+               unlock_range(mm->map, end);
 
        /* Detach vmas from the MM linked list and remove from the mm tree*/
        if (!detach_vmas_to_be_unmapped(mm, vma, prev, end))