When merging the previous value, set the vma iterator to the previous
slot. Don't use the vma iterator to get the next/prev so that it is in
the correct position for a write.
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
&& can_vma_merge_after(prev, vm_flags, anon_vma, file,
pgoff, vm_userfaultfd_ctx, anon_name)) {
merge_prev = true;
+ vma_prev(vmi);
}
}
/* Can we merge the successor? */
validate_mm(mm);
khugepaged_enter_vma(res, vm_flags);
- if (res)
- vma_iter_set(vmi, end);
-
return res;
}