mm: hugetlbfs: use __compound_tail_refcounted in __get_page_tail too
authorAndrea Arcangeli <[email protected]>
Tue, 21 Jan 2014 23:48:56 +0000 (15:48 -0800)
committerLinus Torvalds <[email protected]>
Wed, 22 Jan 2014 00:19:43 +0000 (16:19 -0800)
Also remove hugetlb.h which isn't needed anymore as PageHeadHuge is
handled in mm.h.

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/swap.c

index bba4aa5bf686700043b02146e86f9223197fad1d..7434e3619c14108181dab183b8c532d6bddecec0 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -31,7 +31,6 @@
 #include <linux/memcontrol.h>
 #include <linux/gfp.h>
 #include <linux/uio.h>
-#include <linux/hugetlb.h>
 
 #include "internal.h"
 
@@ -261,7 +260,7 @@ bool __get_page_tail(struct page *page)
        struct page *page_head = compound_trans_head(page);
 
        /* Ref to put_compound_page() comment. */
-       if (PageSlab(page_head) || PageHeadHuge(page_head)) {
+       if (!__compound_tail_refcounted(page_head)) {
                smp_rmb();
                if (likely(PageTail(page))) {
                        /*