From: Peng Tao Date: Tue, 24 Jan 2012 05:00:30 +0000 (+0800) Subject: LU-709 build: clean up LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP X-Git-Tag: 2.2.51~25 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=8f2dbe8765d585895eabdfe0646ed0794c057426;ds=sidebyside LU-709 build: clean up LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP grab_cache_page_nowait_gfp does not exist from v2.6.18 to latest kernel. HAVE_ADD_TO_PAGE_CACHE_LRU is checked twice Signed-off-by: Peng Tao Change-Id: I95b8ba91b357c5803613927fce41804f1ad6adf8 Reviewed-on: http://review.whamcloud.com/2326 Reviewed-by: Andreas Dilger Tested-by: Hudson Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index e855aea..3181183 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -307,27 +307,6 @@ AC_DEFUN([LC_EXPORT_NODE_TO_CPUMASK], ]) # -# LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP -# -# Check for our patched grab_cache_page_nowait_gfp() function -# after 2.6.29 we can emulate this using add_to_page_cache_lru() -# -AC_DEFUN([LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP], -[LB_CHECK_SYMBOL_EXPORT([grab_cache_page_nowait_gfp], -[mm/filemap.c],[ - AC_DEFINE(HAVE_GRAB_CACHE_PAGE_NOWAIT_GFP, 1, - [kernel exports grab_cache_page_nowait_gfp]) - ], - [LB_CHECK_SYMBOL_EXPORT([add_to_page_cache_lru], - [mm/filemap.c],[ - AC_DEFINE(HAVE_ADD_TO_PAGE_CACHE_LRU, 1, - [kernel exports add_to_page_cache_lru]) - ],[ - ]) - ]) -]) - -# # # between 2.6.5 - 2.6.22 filemap_populate is exported in some kernels # @@ -1934,6 +1913,7 @@ AC_DEFUN([LC_SET_CPUS_ALLOWED], # LC_D_OBTAIN_ALIAS # starting from 2.6.28 kernel replaces d_alloc_anon() with # d_obtain_alias() for getting anonymous dentries +# RHEL5(2.6.18) has d_obtain_alias but SLES11SP0(2.6.27) not # AC_DEFUN([LC_D_OBTAIN_ALIAS], [AC_MSG_CHECKING([d_obtain_alias exist in kernel]) @@ -2145,7 +2125,6 @@ AC_DEFUN([LC_PROG_LINUX], LC_EXPORT___D_REHASH LC_EXPORT_NODE_TO_CPUMASK - LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP LC_FILEMAP_POPULATE LC_BIT_SPINLOCK_H @@ -2170,7 +2149,6 @@ AC_DEFUN([LC_PROG_LINUX], # 2.6.12 LC_RW_TREE_LOCK - LC_EXPORT_SYNCHRONIZE_RCU # 2.6.15 LC_INODE_I_MUTEX @@ -2525,6 +2503,7 @@ if test x$enable_split != xno; then fi ]) +# RHEL5(2.6.18) has tux_info AC_DEFUN([LC_TASK_CLENV_TUX_INFO], [AC_MSG_CHECKING([tux_info]) LB_LINUX_TRY_COMPILE([ diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h index b0686f7..d2939b5 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h @@ -346,10 +346,6 @@ static inline int mapping_has_pages(struct address_space *mapping) #define DOWN_READ_I_ALLOC_SEM(i) down_read(&(i)->i_alloc_sem) #define LASSERT_I_ALLOC_SEM_READ_LOCKED(i) LASSERT(down_write_trylock(&(i)->i_alloc_sem) == 0) -#ifndef HAVE_GRAB_CACHE_PAGE_NOWAIT_GFP -#define grab_cache_page_nowait_gfp(x, y, z) grab_cache_page_nowait((x), (y)) -#endif - #include /* for generic_writepages */ #ifndef HAVE_FILEMAP_FDATAWRITE_RANGE #include /* for mapping->backing_dev_info */ diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index 4e900af..fee99b3 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -541,7 +541,7 @@ static int ll_read_ahead_page(const struct lu_env *env, struct cl_io *io, #ifdef __GFP_NOWARN gfp_mask |= __GFP_NOWARN; #endif - vmpage = grab_cache_page_nowait_gfp(mapping, index, gfp_mask); + vmpage = grab_cache_page_nowait(mapping, index); if (vmpage != NULL) { /* Check if vmpage was truncated or reclaimed */ if (vmpage->mapping == mapping) {