From 4cd191029b5d58f9f311cb60a31b8e7b4ded0a07 Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Sat, 31 Oct 2009 13:27:18 -0400 Subject: [PATCH] Linux: Fix write_begin configure test for recent RHEL kernels Recent RHEL kernels now define simple_write_begin, which was used as a test for the write_begin address_space op. This makes the test succeed when it shouldn't, and breaks the build. Rewrite the test to actually check the address_space operation. Change-Id: Idac9b318ff716b61bf8ca4508d2dbdbfbad5b50d Reviewed-on: http://gerrit.openafs.org/759 Reviewed-by: Simon Wilkinson Tested-by: Marc Dionne Reviewed-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/766 Tested-by: Derrick Brashear --- src/cf/linux-test4.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 index 4499a6676..fa7143e96 100644 --- a/src/cf/linux-test4.m4 +++ b/src/cf/linux-test4.m4 @@ -1102,7 +1102,8 @@ AC_DEFUN([LINUX_HAVE_WRITE_BEGIN_AOP], [ AC_CACHE_VAL([ac_cv_linux_write_begin], [ AC_TRY_KBUILD( [#include ], -[simple_write_begin(NULL, NULL, 0, 0, 0, NULL, NULL);], +[struct address_space_operations _aop; +_aop.write_begin = NULL;], ac_cv_linux_write_begin=yes, ac_cv_linux_write_begin=no)]) AC_MSG_RESULT($ac_cv_linux_write_begin) -- 2.39.5