From 4fcd3ddd64cd58bd1621d58e6c324f8e4cbbdc12 Mon Sep 17 00:00:00 2001 From: brian Date: Wed, 19 Aug 2009 21:21:54 +0000 Subject: [PATCH] b=20451 i=yangsheng i=adilger Need to also make sure the kernel supports grab_cache_page_write_begin() when enabling the .write_{begin,end} struct address_space_operations members since write_begin() uses grab_cache_page_write_begin(). --- lustre/autoconf/lustre-core.m4 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 8e52200..5494484 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -1588,11 +1588,16 @@ AC_DEFUN([LC_WRITE_BEGIN_END], [AC_MSG_CHECKING([if kernel has .write_begin/end]) LB_LINUX_TRY_COMPILE([ #include +#ifdef HAVE_LINUX_MMTYPES_H + #include +#endif ],[ struct address_space_operations aops; + struct page *page; aops.write_begin = NULL; aops.write_end = NULL; + page = grab_cache_page_write_begin(NULL, 0, 0); ], [ AC_MSG_RESULT([yes]) AC_DEFINE(HAVE_KERNEL_WRITE_BEGIN_END, 1, -- 1.8.3.1