mm/hugetlb.c: simplify PageHeadHuge() and PageHuge()
authorAndrew Morton <[email protected]>
Tue, 21 Jan 2014 23:48:57 +0000 (15:48 -0800)
committerLinus Torvalds <[email protected]>
Wed, 22 Jan 2014 00:19:43 +0000 (16:19 -0800)
Signed-off-by: Andrea Arcangeli <[email protected]>
Cc: Khalid Aziz <[email protected]>
Cc: Pravin Shelar <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Ben Hutchings <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Minchan Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/hugetlb.c

index 7596e104bffac7e4a4ac2afc4d05cfcf00841cb2..1d9125360bf587d601a26574a7cd6ee841488334 100644 (file)
@@ -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);