diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index bb5e8b14883b099c664d8363aa9cefeb2968af80..6c963ad3b1dc62984dddc049b1440cd84bd93aca 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -123,19 +123,18 @@ LB_LINUX_TRY_COMPILE([ ]) # -# LC_FUNC_RELEASEPAGE_WITH_GFP +# LC_FUNC_RELEASEPAGE_WITH_INT # -# if ->releasepage() takes a gfp_t arg in 2.6.9 +# if ->releasepage() takes an int arg in 2.6.9 # This kernel defines gfp_t (HAS_GFP_T) but doesn't use it for this function, # while others either don't have gfp_t or pass gfp_t as the parameter. # -AC_DEFUN([LC_FUNC_RELEASEPAGE_WITH_GFP], -[AC_MSG_CHECKING([if releasepage has a gfp_t parameter]) -RELEASEPAGE_WITH_GFP="`grep -c 'releasepage.*gfp_t' -$LINUX/include/linux/fs.h`" -if test "$RELEASEPAGE_WITH_GFP" != 0 ; then - AC_DEFINE(HAVE_RELEASEPAGE_WITH_GFP, 1, - [releasepage with gfp_t parameter]) +AC_DEFUN([LC_FUNC_RELEASEPAGE_WITH_INT], +[AC_MSG_CHECKING([if releasepage has a int parameter]) +RELEASEPAGE_WITH_INT="`grep -c 'releasepage.*int' $LINUX/include/linux/fs.h`" +if test "$RELEASEPAGE_WITH_INT" != 0 ; then + AC_DEFINE(HAVE_RELEASEPAGE_WITH_INT, 1, + [releasepage with int parameter]) AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) @@ -1548,6 +1547,7 @@ AC_DEFUN([LC_PROG_LINUX], LC_STRUCT_KIOBUF LC_FUNC_COND_RESCHED + LC_FUNC_RELEASEPAGE_WITH_INT LC_FUNC_ZAP_PAGE_RANGE LC_FUNC_PDE LC_FUNC_DIRECT_IO diff --git a/lustre/llite/rw26.c b/lustre/llite/rw26.c index 39585881d51758c6090ec86a75961877fe750fef..f82c41b23d50ded7b835d7e200aa0ff8020af785 100644 --- a/lustre/llite/rw26.c +++ b/lustre/llite/rw26.c @@ -94,10 +94,10 @@ static void ll_invalidatepage(struct page *page, unsigned long offset) } #endif -#ifdef HAVE_RELEASEPAGE_WITH_GFP -#define RELEASEPAGE_ARG_TYPE gfp_t -#else +#ifdef HAVE_RELEASEPAGE_WITH_INT #define RELEASEPAGE_ARG_TYPE int +#else +#define RELEASEPAGE_ARG_TYPE gfp_t #endif static int ll_releasepage(struct page *page, RELEASEPAGE_ARG_TYPE gfp_mask) {