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

Commit 76b3aec3 authored by Kirill A. Shutemov's avatar Kirill A. Shutemov Committed by Linus Torvalds
Browse files

tile: handle pgtable_page_ctor() fail

parent 1ae9ae5f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -241,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
@@ -251,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;
}