Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0470d4aa authored by Kirill A. Shutemov's avatar Kirill A. Shutemov Committed by Linus Torvalds
Browse files

mn10300: add missing pgtable_page_ctor/dtor calls



It will fix NR_PAGETABLE accounting.  It's also required if the arch is
going ever support split ptl.

Signed-off-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: default avatarDavid Howells <dhowells@redhat.com>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8abe7346
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -46,6 +46,7 @@ static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)


static inline void pte_free(struct mm_struct *mm, struct page *pte)
static inline void pte_free(struct mm_struct *mm, struct page *pte)
{
{
	pgtable_page_dtor(pte);
	__free_page(pte);
	__free_page(pte);
}
}


+7 −2
Original line number Original line Diff line number Diff line
@@ -78,8 +78,13 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)
#else
#else
	pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0);
	pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0);
#endif
#endif
	if (pte)
	if (!pte)
		return NULL;
	clear_highpage(pte);
	clear_highpage(pte);
	if (!pgtable_page_ctor(pte)) {
		__free_page(pte);
		return NULL;
	}
	return pte;
	return pte;
}
}