Whamcloud - gitweb
b=20451
authorbrian <brian>
Wed, 19 Aug 2009 21:21:54 +0000 (21:21 +0000)
committerbrian <brian>
Wed, 19 Aug 2009 21:21:54 +0000 (21:21 +0000)
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

index 8e52200..5494484 100644 (file)
@@ -1588,11 +1588,16 @@ AC_DEFUN([LC_WRITE_BEGIN_END],
 [AC_MSG_CHECKING([if kernel has .write_begin/end])
 LB_LINUX_TRY_COMPILE([
         #include <linux/fs.h>
+#ifdef HAVE_LINUX_MMTYPES_H
+        #include <linux/mm_types.h>
+#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,