From 510d7834b1b2f4497e0b0d88cbf7104a7e820ff6 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Thu, 19 Feb 2009 15:08:00 +0000 Subject: [PATCH] kvm: external module: handle compound_head() on RHEL 5.2+ RHEL 5.2 introduced compound_head(), so we need additional hackery to avoid redefining it. Signed-off-by: Avi Kivity Signed-off-by: Eduardo Habkost RH-Upstream-status: applied(kvm/master) Bugzilla: 488727 Acked-by: Eduardo Habkost Acked-by: Andrea Arcangeli --- kernel/external-module-compat-comm.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kernel/external-module-compat-comm.h b/kernel/external-module-compat-comm.h index c1fc866d..194105b3 100644 --- a/kernel/external-module-compat-comm.h +++ b/kernel/external-module-compat-comm.h @@ -742,6 +742,15 @@ static inline void cpumask_clear_cpu(int cpu, cpumask_var_t mask) /* compound_head() was introduced in 2.6.22 */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) +# define NEED_COMPOUND_HEAD 1 +# ifdef RHEL_RELEASE_CODE +# if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(5,2) +# undef NEED_COMPOUND_HEAD +# endif +# endif +#endif + +#ifdef NEED_COMPOUND_HEAD static inline struct page *compound_head(struct page *page) { -- 2.11.4.GIT