ubc: batch non-4level page tables kmem acct From: Konstantin Khlebnikov fix for diff-ubc-batch-page-tables-kmem-acct Signed-off-by: Konstantin Khlebnikov --- mm/memory.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 45ca938..b1331d8 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -176,7 +176,9 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud, pmd = pmd_offset(pud, start); pud_clear(pud); pmd_free_tlb(tlb, pmd); +#ifndef __PAGETABLE_PMD_FOLDED tlb->mm->page_table_acct--; +#endif } static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd, @@ -210,7 +212,9 @@ static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd, pud = pud_offset(pgd, start); pgd_clear(pgd); pud_free_tlb(tlb, pud); +#ifndef __PAGETABLE_PUD_FOLDED tlb->mm->page_table_acct--; +#endif } /*