[PATCH 34 of 66] add PageTransCompound

Andrea Arcangeli
2010-11-03T15:30:42Z

From: Andrea Arcangeli <aarcange@redhat.com>

Remove branches when CONFIG_TRANSPARENT_HUGEPAGE=n.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
---

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);