diff options
Diffstat (limited to 'arch/tile/mm/pgtable.c')
| -rw-r--r-- | arch/tile/mm/pgtable.c | 9 | 
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/tile/mm/pgtable.c b/arch/tile/mm/pgtable.c index 2deaddf3e01..5e86eac4bfa 100644 --- a/arch/tile/mm/pgtable.c +++ b/arch/tile/mm/pgtable.c @@ -127,8 +127,7 @@ void shatter_huge_page(unsigned long addr)  	}  	/* Shatter the huge page into the preallocated L2 page table. */ -	pmd_populate_kernel(&init_mm, pmd, -			    get_prealloc_pte(pte_pfn(*(pte_t *)pmd))); +	pmd_populate_kernel(&init_mm, pmd, get_prealloc_pte(pmd_pfn(*pmd)));  #ifdef __PAGETABLE_PMD_FOLDED  	/* Walk every pgd on the system and update the pmd there. */ @@ -242,6 +241,11 @@ struct page *pgtable_alloc_one(struct mm_struct *mm, unsigned long address,  	if (p == NULL)  		return NULL; +	if (!pgtable_page_ctor(p)) { +		__free_pages(p, L2_USER_PGTABLE_ORDER); +		return NULL; +	} +  	/*  	 * Make every page have a page_count() of one, not just the first.  	 * We don't use __GFP_COMP since it doesn't look like it works @@ -252,7 +256,6 @@ struct page *pgtable_alloc_one(struct mm_struct *mm, unsigned long address,  		inc_zone_page_state(p+i, NR_PAGETABLE);  	} -	pgtable_page_ctor(p);  	return p;  }  | 
