aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 99e8d5c7b312..b5af358b8b22 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1645,6 +1645,8 @@ static int apply_to_pte_range(struct mm_struct *mm, pmd_t *pmd,
1645 1645
1646 BUG_ON(pmd_huge(*pmd)); 1646 BUG_ON(pmd_huge(*pmd));
1647 1647
1648 arch_enter_lazy_mmu_mode();
1649
1648 token = pmd_pgtable(*pmd); 1650 token = pmd_pgtable(*pmd);
1649 1651
1650 do { 1652 do {
@@ -1653,6 +1655,8 @@ static int apply_to_pte_range(struct mm_struct *mm, pmd_t *pmd,
1653 break; 1655 break;
1654 } while (pte++, addr += PAGE_SIZE, addr != end); 1656 } while (pte++, addr += PAGE_SIZE, addr != end);
1655 1657
1658 arch_leave_lazy_mmu_mode();
1659
1656 if (mm != &init_mm) 1660 if (mm != &init_mm)
1657 pte_unmap_unlock(pte-1, ptl); 1661 pte_unmap_unlock(pte-1, ptl);
1658 return err; 1662 return err;