Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 3160499aacb81f6735941eb4c372d87a > files > 284

kvm-83-164.el5_5.30.src.rpm

From 510d7834b1b2f4497e0b0d88cbf7104a7e820ff6 Mon Sep 17 00:00:00 2001
From: Avi Kivity <avi@redhat.com>
Date: Thu, 19 Feb 2009 15:08:00 +0000
Subject: [PATCH 3/3] 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 <avi@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
RH-Upstream-status: applied(kvm/master)
Bugzilla: 488727
Acked-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Andrea Arcangeli <aarcange@redhat.com>
---
 kernel/external-module-compat-comm.h |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/kernel/external-module-compat-comm.h b/kernel/external-module-compat-comm.h
index c1fc866..194105b 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)
 {
-- 
1.6.1