if (! pgd_none(*pgd)) { pte_t *pte = (pte_t *)pgd_page(*pgd);
if (! pud_none(*pud)) { pte_t *pte = (pte_t *)pud_page(*pud);
void hugetlb_mm_free_pgd(struct mm_struct *mm){	int i;	pgd_t *pgdir;	spin_lock(&mm->page_table_lock);	pgdir = mm->context.huge_pgdir;	if (! pgdir)		goto out;	mm->context.huge_pgdir = NULL;	/* cleanup any hugepte pages leftover */	for (i = 0; i < PTRS_PER_HUGEPGD; i++) {		pgd_t *pgd = pgdir + i;		if (! pgd_none(*pgd)) {			pte_t *pte = (pte_t *)pgd_page(*pgd);			struct page *ptepage = virt_to_page(pte);			ptepage->mapping = NULL;			BUG_ON(memcmp(pte, empty_zero_page, PAGE_SIZE));			kmem_cache_free(zero_cache, pte);		}		pgd_clear(pgd);	}	BUG_ON(memcmp(pgdir, empty_zero_page, PAGE_SIZE));	kmem_cache_free(zero_cache, pgdir); out:	spin_unlock(&mm->page_table_lock);}