Lines Matching refs:newflags
364 unsigned long start, unsigned long end, vm_flags_t newflags) in mlock_vma_pages_range() argument
381 if (newflags & VM_LOCKED) in mlock_vma_pages_range()
382 newflags |= VM_IO; in mlock_vma_pages_range()
383 WRITE_ONCE(vma->vm_flags, newflags); in mlock_vma_pages_range()
389 if (newflags & VM_IO) { in mlock_vma_pages_range()
390 newflags &= ~VM_IO; in mlock_vma_pages_range()
391 WRITE_ONCE(vma->vm_flags, newflags); in mlock_vma_pages_range()
405 unsigned long start, unsigned long end, vm_flags_t newflags) in mlock_fixup() argument
413 if (newflags == oldflags || (oldflags & VM_SPECIAL) || in mlock_fixup()
420 *prev = vma_merge(mm, *prev, start, end, newflags, vma->anon_vma, in mlock_fixup()
445 if (!(newflags & VM_LOCKED)) in mlock_fixup()
457 if ((newflags & VM_LOCKED) && (oldflags & VM_LOCKED)) { in mlock_fixup()
459 vma->vm_flags = newflags; in mlock_fixup()
461 mlock_vma_pages_range(vma, start, end, newflags); in mlock_fixup()
493 vm_flags_t newflags = vma->vm_flags & VM_LOCKED_CLEAR_MASK; in apply_vma_lock_flags() local
495 newflags |= flags; in apply_vma_lock_flags()
501 error = mlock_fixup(vma, &prev, nstart, tmp, newflags); in apply_vma_lock_flags()
683 vm_flags_t newflags; in apply_mlockall_flags() local
685 newflags = vma->vm_flags & VM_LOCKED_CLEAR_MASK; in apply_mlockall_flags()
686 newflags |= to_add; in apply_mlockall_flags()
689 mlock_fixup(vma, &prev, vma->vm_start, vma->vm_end, newflags); in apply_mlockall_flags()