Skip to content
Commit 50c6a665 authored by Scott Wood's avatar Scott Wood
Browse files

powerpc/hugetlb: Call mm_dec_nr_pmds() in hugetlb_free_pmd_range()



Commit dc6c9a35 ("mm: account pmd page tables to the process")
added a counter that is incremented whenever a PMD is allocated and
decremented whenever a PMD is freed.  For hugepages on PPC, common code
is used to allocated PMDs, but arch-specific code is used to free PMDs.

This results in kernel output such as "BUG: non-zero nr_pmds on freeing
mm: 1" when using hugepages.

Update the PPC hugepage PMD freeing code to decrement the count, just
as the above commit did for free_pmd_range().

Fixes: dc6c9a35 ("mm: account pmd page tables to the process")
Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
Reviewed-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org # 4.0.x
parent 39a88044
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment