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)
{
* 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))