[PATCH 34 of 66] add PageTransCompound

From: Andrea Arcangeli
Date: Wed Nov 03 2010 - 11:39:58 EST


From: Andrea Arcangeli <aarcange@xxxxxxxxxx>

Remove branches when CONFIG_TRANSPARENT_HUGEPAGE=n.

Signed-off-by: Andrea Arcangeli <aarcange@xxxxxxxxxx>
---

diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -105,6 +105,10 @@ static inline int PageTransHuge(struct p
VM_BUG_ON(PageTail(page));
return PageHead(page);
}
+static inline int PageTransCompound(struct page *page)
+{
+ return PageCompound(page);
+}
#else /* CONFIG_TRANSPARENT_HUGEPAGE */
#define HPAGE_PMD_SHIFT ({ BUG(); 0; })
#define HPAGE_PMD_MASK ({ BUG(); 0; })
@@ -122,6 +126,7 @@ static inline int split_huge_page(struct
#define wait_split_huge_page(__anon_vma, __pmd) \
do { } while (0)
#define PageTransHuge(page) 0
+#define PageTransCompound(page) 0
static inline int hugepage_madvise(unsigned long *vm_flags)
{
BUG_ON(0);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/