]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/hugetlb: Call mm_dec_nr_pmds() in hugetlb_free_pmd_range()
authorScott Wood <scottwood@freescale.com>
Sat, 11 Apr 2015 00:37:34 +0000 (19:37 -0500)
committerScott Wood <scottwood@freescale.com>
Wed, 15 Apr 2015 20:24:22 +0000 (15:24 -0500)
commit44314e52fdc247af7edf3b0c0c6204c75d228e2d
tree300d70280629baa31706090fdb6806e5d3bce237
parent477fa6254cf26649e16c98cca47dbae2765b1ffb
powerpc/hugetlb: Call mm_dec_nr_pmds() in hugetlb_free_pmd_range()

Commit 766ca42cf9432 ("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: 766ca42cf9432 ("mm: account pmd page tables to the process")
Signed-off-by: Scott Wood <scottwood@freescale.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org # 4.0.x
arch/powerpc/mm/hugetlbpage.c