if ((vma != vma_mt) ||
(vma->vm_start != vma_mt->vm_start) ||
- (vma->vm_end != vma_mt->vm_end)) {
- pr_emerg("mt: %px %lu - %lu\n", vma_mt,
+ (vma->vm_end != vma_mt->vm_end) ||
+ (vma->vm_start != mas.index) ||
+ (vma->vm_end -1 != mas.last)){
+ pr_emerg("mt piv: %px %lu - %lu\n", vma_mt,
+ mas.index, mas.last);
+ pr_emerg("mt vma: %px %lu - %lu\n", vma_mt,
vma_mt->vm_start, vma_mt->vm_end);
- pr_emerg("rb: %px %lu - %lu\n", vma,
+ pr_emerg("rb vma: %px %lu - %lu\n", vma,
vma->vm_start, vma->vm_end);
if (ignore)
pr_emerg("rb_skip %px %lu - %lu\n", ignore,
vma->vm_pgoff = pgoff;
if (adjust_next) {
+ // maple tree erase is unnecessary as the adjusting of the vma
+ // would have overwritten the area.
next->vm_start += adjust_next;
next->vm_pgoff += adjust_next >> PAGE_SHIFT;
+ // the vma_store is necessary as the adjust_next may be
+ // negative and expand backwards.
__vma_mt_store(mm, next);
}