]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
thp-mremap-support-and-tlb-optimization-fix-fix-fix
authorAndrea Arcangeli <aarcange@redhat.com>
Wed, 5 Oct 2011 00:43:02 +0000 (11:43 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 12 Oct 2011 06:32:07 +0000 (17:32 +1100)
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c

index fffab174f3e76bb7def297ef5649882aedbcf958..6b072bdccf817d1ec223a96ba0209ff2eab3cd51 100644 (file)
@@ -1064,7 +1064,7 @@ int move_huge_pmd(struct vm_area_struct *vma, struct vm_area_struct *new_vma,
 
        if ((old_addr & ~HPAGE_PMD_MASK) ||
            (new_addr & ~HPAGE_PMD_MASK) ||
-           (old_addr + HPAGE_PMD_SIZE) > old_end ||
+           old_end - old_addr < HPAGE_PMD_SIZE ||
            (new_vma->vm_flags & VM_NOHUGEPAGE))
                goto out;