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

Commit 758f66a2 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds
Browse files

mm/hugetlb.c: simplify PageHeadHuge() and PageHuge()



Signed-off-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
Cc: Khalid Aziz <khalid.aziz@oracle.com>
Cc: Pravin Shelar <pshelar@nicira.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ben Hutchings <bhutchings@solarflare.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Johannes Weiner <jweiner@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3bfcd13e
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -690,15 +690,11 @@ static void prep_compound_gigantic_page(struct page *page, unsigned long order)
 */
int PageHuge(struct page *page)
{
	compound_page_dtor *dtor;

	if (!PageCompound(page))
		return 0;

	page = compound_head(page);
	dtor = get_compound_page_dtor(page);

	return dtor == free_huge_page;
	return get_compound_page_dtor(page) == free_huge_page;
}
EXPORT_SYMBOL_GPL(PageHuge);

@@ -708,14 +704,10 @@ EXPORT_SYMBOL_GPL(PageHuge);
 */
int PageHeadHuge(struct page *page_head)
{
	compound_page_dtor *dtor;

	if (!PageHead(page_head))
		return 0;

	dtor = get_compound_page_dtor(page_head);

	return dtor == free_huge_page;
	return get_compound_page_dtor(page_head) == free_huge_page;
}
EXPORT_SYMBOL_GPL(PageHeadHuge);