The patch titled thp-mremap-support-and-tlb-optimization-fix has been added to the -mm tree. Its filename is thp-mremap-support-and-tlb-optimization-fix.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 *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: thp-mremap-support-and-tlb-optimization-fix From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> coding-style nitpicking Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Johannes Weiner <jweiner@xxxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/huge_memory.c | 9 ++++----- mm/mremap.c | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff -puN mm/huge_memory.c~thp-mremap-support-and-tlb-optimization-fix mm/huge_memory.c --- a/mm/huge_memory.c~thp-mremap-support-and-tlb-optimization-fix +++ a/mm/huge_memory.c @@ -1065,15 +1065,14 @@ int move_huge_pmd(struct vm_area_struct if ((old_addr & ~HPAGE_PMD_MASK) || (new_addr & ~HPAGE_PMD_MASK) || (old_addr + HPAGE_PMD_SIZE) > old_end || - new_vma->vm_flags & VM_NOHUGEPAGE) + (new_vma->vm_flags & VM_NOHUGEPAGE)) goto out; /* * The destination pmd shouldn't be established, free_pgtables() * should have release it. */ - if (!pmd_none(*new_pmd)) { - WARN_ON(1); + if (!WARN_ON(pmd_none(*new_pmd))) { VM_BUG_ON(pmd_trans_huge(*new_pmd)); goto out; } @@ -1091,9 +1090,9 @@ int move_huge_pmd(struct vm_area_struct spin_unlock(&mm->page_table_lock); ret = 1; } - } else + } else { spin_unlock(&mm->page_table_lock); - + } out: return ret; } diff -puN mm/mremap.c~thp-mremap-support-and-tlb-optimization-fix mm/mremap.c --- a/mm/mremap.c~thp-mremap-support-and-tlb-optimization-fix +++ a/mm/mremap.c @@ -155,13 +155,13 @@ unsigned long move_page_tables(struct vm if (err > 0) { need_flush = true; continue; - } else if (!err) + } else if (!err) { split_huge_page_pmd(vma->vm_mm, old_pmd); + } VM_BUG_ON(pmd_trans_huge(*old_pmd)); } if (pmd_none(*new_pmd) && __pte_alloc(new_vma->vm_mm, new_vma, - new_pmd, - new_addr)) + new_pmd, new_addr)) break; next = (new_addr + PMD_SIZE) & PMD_MASK; if (extent > next - new_addr) _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are headers_check-is-broken.patch samples-hidraw-is-busted.patch alpha-unbreak-osf_setsysinfossi_nvpairs-checkpatch-fixes.patch linux-next.patch i-need-old-gcc.patch arch-alpha-kernel-systblss-remove-debug-check.patch kernel-timec-change-jiffies_to_clock_t-input-parameters-type-to-unsigned-long.patch arch-x86-platform-iris-irisc-register-a-platform-device-and-a-platform-driver.patch leds-new-pcengines-alix-system-driver-enables-leds-via-gpio-interface-fix.patch mm.patch mm-vmscan-fix-force-scanning-small-targets-without-swap-fix.patch vmscan-use-atomic-long-for-shrinker-batching-fix.patch mm-avoid-null-pointer-access-in-vm_struct-via-proc-vmallocinfo.patch thp-mremap-support-and-tlb-optimization-fix.patch frv-duplicate-output_buffer-of-e03-checkpatch-fixes.patch hpet-factor-timer-allocate-from-open.patch leds-route-kbd-leds-through-the-generic-leds-layer.patch leds-route-kbd-leds-through-the-generic-leds-layer-fix.patch lib-crc-add-slice-by-8-algorithm-to-crc32c-fix.patch lib-hexdumpc-make-hex2bin-return-the-updated-src-address.patch fs-binfmt_miscc-use-kernels-hex_to_bin-method-fix.patch fs-binfmt_miscc-use-kernels-hex_to_bin-method-fix-fix.patch ipc-introduce-shm_rmid_forced-sysctl-testing.patch nbd-replace-some-printk-with-dev_warn-and-dev_info-checkpatch-fixes.patch pps-new-client-driver-using-gpio-fix.patch scatterlist-new-helper-functions.patch scatterlist-new-helper-functions-update-fix.patch memstick-add-support-for-legacy-memorysticks-fix.patch kexec-remove-kmsg_dump_kexec.patch journal_add_journal_head-debug.patch mutex-subsystem-synchro-test-module-fix.patch slab-leaks3-default-y.patch put_bh-debug.patch memblock-add-input-size-checking-to-memblock_find_region.patch memblock-add-input-size-checking-to-memblock_find_region-fix.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