From 3a5a613b977e1bfc9d66783e82645903087816a9 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 1 Jun 2013 18:00:12 +0200 Subject: [PATCH] backports: do not backport shmem_read_mapping_page_gfp() on RHEL 6.4 shmem_read_mapping_page_gfp() looks different in the RHEL 6.4 source code and we should use that version instead. This also adds a missing include to prefix this function with backport_. Signed-off-by: Hauke Mehrtens Signed-off-by: Luis R. Rodriguez --- backport/backport-include/linux/shmem_fs.h | 2 ++ backport/compat/compat-3.0.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/backport/backport-include/linux/shmem_fs.h b/backport/backport-include/linux/shmem_fs.h index f32de7ad32c5..4d3964e2892b 100644 --- a/backport/backport-include/linux/shmem_fs.h +++ b/backport/backport-include/linux/shmem_fs.h @@ -3,6 +3,7 @@ #include_next +#if (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(6,4)) #if LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0) /* This pulls-in a lot of non-exported symbol backports * on kernels older than 2.6.32. There's no harm for not @@ -33,5 +34,6 @@ static inline struct page *shmem_read_mapping_page( } #endif #endif +#endif #endif /* __BACKPORT_LINUX_SHMEM_FS_H */ diff --git a/backport/compat/compat-3.0.c b/backport/compat/compat-3.0.c index e84137301d4f..f52392c0ac54 100644 --- a/backport/compat/compat-3.0.c +++ b/backport/compat/compat-3.0.c @@ -12,11 +12,13 @@ #include #include +#if (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(6,4)) /* This pulls-in a lot of non-exported symbol backports * on kernels older than 2.6.32. There's no harm for not * making this available on kernels < 2.6.32. */ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) #include +#include /* This backports: * @@ -34,6 +36,7 @@ struct page *shmem_read_mapping_page_gfp(struct address_space *mapping, } EXPORT_SYMBOL_GPL(shmem_read_mapping_page_gfp); #endif +#endif int mac_pton(const char *s, u8 *mac) { -- 2.30.2