powerpc/mm/hugetlb: Add support for page accounting
authorBalbir Singh <bsingharora@gmail.com>
Tue, 2 May 2017 05:17:06 +0000 (15:17 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 5 Jun 2017 09:03:12 +0000 (19:03 +1000)
Add __GFP_ACCOUNT to __hugepte_alloc()

Signed-off-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/hugetlbpage.c

index a4f33de4008eeed9829eb1ceef01e72d7cedfd8f..94e56b10e4cca79786a2be2d8827f6a5d12c01bf 100644 (file)
@@ -77,7 +77,7 @@ static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp,
                num_hugepd = 1;
        }
 
-       new = kmem_cache_zalloc(cachep, GFP_KERNEL);
+       new = kmem_cache_zalloc(cachep, pgtable_gfp_flags(mm, GFP_KERNEL));
 
        BUG_ON(pshift > HUGEPD_SHIFT_MASK);
        BUG_ON((unsigned long)new & HUGEPD_SHIFT_MASK);