From: Liam R. Howlett Date: Fri, 30 Oct 2020 19:19:27 +0000 (-0400) Subject: mmm/mmap: Fix differences after rebase X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3c012fee6d01aec982a6d2efaa35bc0fe85b4d32;p=users%2Fjedix%2Flinux-maple.git mmm/mmap: Fix differences after rebase Signed-off-by: Liam R. Howlett --- diff --git a/mm/mmap.c b/mm/mmap.c index ad63cc7cf3da..3e4c792d15b5 100644 --- 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))