The patch titled Subject: mm-mlock-add-mlock-flags-to-enable-vm_lockonfault-usage-v9 has been added to the -mm tree. Its filename is mm-mlock-add-mlock-flags-to-enable-vm_lockonfault-usage-v9.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-mlock-add-mlock-flags-to-enable-vm_lockonfault-usage-v9.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-mlock-add-mlock-flags-to-enable-vm_lockonfault-usage-v9.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Eric B Munson <emunson@xxxxxxxxxx> Subject: mm-mlock-add-mlock-flags-to-enable-vm_lockonfault-usage-v9 Signed-off-by: Eric B Munson <emunson@xxxxxxxxxx> Acked-by: Michal Hocko <mhocko@xxxxxxxx> Acked-by: Vlastimil Babka <vbabka@xxxxxxx> Cc: Jonathan Corbet <corbet@xxxxxxx> Cc: Catalin Marinas <catalin.marinas@xxxxxxx> Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Cc: Guenter Roeck <linux@xxxxxxxxxxxx> Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Cc: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Cc: Michael Kerrisk <mtk.manpages@xxxxxxxxx> Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx> Cc: Shuah Khan <shuahkh@xxxxxxxxxxxxxxx> Cc: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/mlock.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff -puN mm/mlock.c~mm-mlock-add-mlock-flags-to-enable-vm_lockonfault-usage-v9 mm/mlock.c --- a/mm/mlock.c~mm-mlock-add-mlock-flags-to-enable-vm_lockonfault-usage-v9 +++ a/mm/mlock.c @@ -578,8 +578,7 @@ static int apply_vma_lock_flags(unsigned prev = vma; for (nstart = start ; ; ) { - vm_flags_t newflags = - vma->vm_flags & ~(VM_LOCKED | VM_LOCKONFAULT); + vm_flags_t newflags = vma->vm_flags & VM_LOCKED_CLEAR_MASK; newflags |= flags; @@ -688,7 +687,7 @@ static int apply_mlockall_flags(int flag struct vm_area_struct * vma, * prev = NULL; vm_flags_t to_add = 0; - current->mm->def_flags &= ~(VM_LOCKED | VM_LOCKONFAULT); + current->mm->def_flags &= VM_LOCKED_CLEAR_MASK; if (flags & MCL_FUTURE) { current->mm->def_flags |= VM_LOCKED; @@ -708,7 +707,7 @@ static int apply_mlockall_flags(int flag for (vma = current->mm->mmap; vma ; vma = prev->vm_next) { vm_flags_t newflags; - newflags = vma->vm_flags & ~(VM_LOCKED | VM_LOCKONFAULT); + newflags = vma->vm_flags & VM_LOCKED_CLEAR_MASK; newflags |= to_add; /* Ignore errors */ _ Patches currently in -mm which might be from emunson@xxxxxxxxxx are mm-mlock-refactor-mlock-munlock-and-munlockall-code.patch mm-mlock-add-new-mlock-system-call.patch mm-introduce-vm_lockonfault.patch mm-introduce-vm_lockonfault-v9.patch mm-mlock-add-mlock-flags-to-enable-vm_lockonfault-usage.patch mm-mlock-add-mlock-flags-to-enable-vm_lockonfault-usage-v9.patch selftests-vm-add-tests-for-lock-on-fault.patch selftests-vm-add-tests-for-lock-on-fault-v9.patch mips-add-entry-for-new-mlock2-syscall.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html