diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 65a1b6c69c111e26bae44cccd7961a303ecdc993..71ffc91060f6d6ad32081bfa53d2a3c7b3706e53 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -468,7 +468,7 @@ struct mem_size_stats { static void smaps_account(struct mem_size_stats *mss, struct page *page, bool compound, bool young, bool dirty) { - int i, nr = compound ? HPAGE_PMD_NR : 1; + int i, nr = compound ? 1 << compound_order(page) : 1; unsigned long size = nr * PAGE_SIZE; if (PageAnon(page))