Use find instead of walk to search for the VMA to ensure a VMA is found
if the start does not fall on a VMA
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
}
if (mas->node == MAS_START)
- vma = mas_walk(mas);
+ vma = mas_find(mas, end - 1);
if (unlikely(uf)) {
/*
/* Unmap the region */
mas_set(&dst, start);
tmp = dst;
- vma = mas_walk(&dst);
+ vma = mas_find(&dst, end - 1);
unmap_region(mm, vma, &dst, start, end, prev, max);
/* Statistics and freeing VMAs */