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 <sxw@inf.ed.ac.uk>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
AC_CACHE_VAL([ac_cv_linux_write_begin], [
AC_TRY_KBUILD(
[#include <linux/fs.h>],
-[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)