*/
static int apply_mlockall_flags(int flags)
{
- VMA_ITERATOR(vmi, current->mm, 0);
+ MA_STATE(mas, ¤t->mm->mm_mt, 0, 0);
struct vm_area_struct *vma, *prev = NULL;
vm_flags_t to_add = 0;
to_add |= VM_LOCKONFAULT;
}
- for_each_vma(vmi, vma) {
+ mas_for_each(&mas, vma, ULONG_MAX) {
vm_flags_t newflags;
newflags = vma->vm_flags & VM_LOCKED_CLEAR_MASK;
/* Ignore errors */
mlock_fixup(vma, &prev, vma->vm_start, vma->vm_end, newflags);
+ mas_pause(&mas);
cond_resched();
}
out: