thp: remove unnecessary tlb flush for mprotect
authorShaohua Li <[email protected]>
Fri, 13 Jan 2012 01:19:13 +0000 (17:19 -0800)
committerLinus Torvalds <[email protected]>
Fri, 13 Jan 2012 04:13:08 +0000 (20:13 -0800)
change_protection() will do TLB flush later, don't need duplicate tlb
flush.

Signed-off-by: Shaohua Li <[email protected]>
Reviewed-by: Andrea Arcangeli <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Minchan Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/huge_memory.c

index 763711121ef52be9df6f7b9892caf4c4cc1779e5..964fc5a2edd2cfcabf83a0e4f8288ad59acab47d 100644 (file)
@@ -1145,7 +1145,6 @@ int change_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
                        entry = pmd_modify(entry, newprot);
                        set_pmd_at(mm, addr, pmd, entry);
                        spin_unlock(&vma->vm_mm->page_table_lock);
-                       flush_tlb_range(vma, addr, addr + HPAGE_PMD_SIZE);
                        ret = 1;
                }
        } else