]> git.proxmox.com Git - mirror_zfs-debian.git/commitdiff
When checking for symbol exports, try compiling.
authorEtienne Dechamps <etienne.dechamps@ovh.net>
Wed, 25 Jul 2012 21:38:58 +0000 (14:38 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 26 Jul 2012 20:42:57 +0000 (13:42 -0700)
This patch adds a new autoconf function: ZFS_LINUX_TRY_COMPILE_SYMBOL.
This new function does the following:

 - Call LINUX_TRY_COMPILE with the specified parameters.
 - If unsuccessful, return false.
 - If successful and we're configuring with --enable-linux-builtin,
   return true.
 - Else, call CHECK_SYMBOL_EXPORT with the specified parameters and
   return the result.

All calls to CHECK_SYMBOL_EXPORT are converted to
LINUX_TRY_COMPILE_SYMBOL so that the tests work even when configuring
for builtin on a kernel which doesn't have loadable module support, or
hasn't been built yet.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #851

13 files changed:
config/kernel-bdi-setup-and-register.m4
config/kernel-blkdev-get-by-path.m4
config/kernel-check-disk-size-change.m4
config/kernel-clear-inode.m4
config/kernel-d-make-root.m4
config/kernel-d-obtain-alias.m4
config/kernel-get-gendisk.m4
config/kernel-insert-inode-locked.m4
config/kernel-mount-nodev.m4
config/kernel-open-bdev-exclusive.m4
config/kernel-truncate-setsize.m4
config/kernel.m4
configure

index 56fab8757374bedad28515f75972cea13ab4c3c8..4196091e91bea70a89ae63201715f075e786b46e 100644 (file)
@@ -5,11 +5,17 @@ dnl # exported by the kernel.  This is a trivial helper function but
 dnl # using it significantly simplifies the code surrounding setting
 dnl # up and tearing down the bdi structure.
 dnl #
-AC_DEFUN([ZFS_AC_KERNEL_BDI_SETUP_AND_REGISTER], [
-       ZFS_CHECK_SYMBOL_EXPORT(
-               [bdi_setup_and_register],
-               [mm/backing-dev.c],
-               [AC_DEFINE(HAVE_BDI_SETUP_AND_REGISTER, 1,
-               [bdi_setup_and_register() is available])],
-               [])
+AC_DEFUN([ZFS_AC_KERNEL_BDI_SETUP_AND_REGISTER],
+       [AC_MSG_CHECKING([whether bdi_setup_and_register() is available])
+       ZFS_LINUX_TRY_COMPILE_SYMBOL([
+               #include <linux/backing-dev.h>
+       ], [
+               bdi_setup_and_register(NULL, NULL, 0);
+       ], [bdi_setup_and_register], [mm/backing-dev.c], [
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_BDI_SETUP_AND_REGISTER, 1,
+                         [bdi_setup_and_register() is available])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
 ])
index 0d5d2b120dec827e9ce1a367ec0eba6cfcfb6b2c..40ecc06b6c92a4d2edc827a0d1a3d31e37360584 100644 (file)
@@ -3,11 +3,17 @@ dnl # 2.6.38 API change
 dnl # open_bdev_exclusive() changed to blkdev_get_by_path()
 dnl # close_bdev_exclusive() changed to blkdev_put()
 dnl #
-AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_GET_BY_PATH], [
-       ZFS_CHECK_SYMBOL_EXPORT(
-               [blkdev_get_by_path],
-               [fs/block_dev.c],
-               [AC_DEFINE(HAVE_BLKDEV_GET_BY_PATH, 1,
-               [blkdev_get_by_path() is available])],
-               [])
+AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_GET_BY_PATH],
+       [AC_MSG_CHECKING([whether blkdev_get_by_path() is available])
+       ZFS_LINUX_TRY_COMPILE_SYMBOL([
+               #include <linux/fs.h>
+       ], [
+               blkdev_get_by_path(NULL, 0, NULL);
+       ], [blkdev_get_by_path], [fs/block_dev.c], [
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_BLKDEV_GET_BY_PATH, 1,
+                         [blkdev_get_by_path() is available])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
 ])
index 1a730c0c5715c43d33f8e1b4544a07afffaaffeb..ea5c75f39f2078740add085f39622d5e99fff87d 100644 (file)
@@ -2,11 +2,17 @@ dnl #
 dnl # 2.6.28 API change
 dnl # Added check_disk_size_change() helper function.
 dnl #
-AC_DEFUN([ZFS_AC_KERNEL_CHECK_DISK_SIZE_CHANGE], [
-       ZFS_CHECK_SYMBOL_EXPORT(
-               [check_disk_size_change],
-               [fs/block_dev.c],
-               [AC_DEFINE(HAVE_CHECK_DISK_SIZE_CHANGE, 1,
-               [check_disk_size_change() is available])],
-               [])
+AC_DEFUN([ZFS_AC_KERNEL_CHECK_DISK_SIZE_CHANGE],
+       [AC_MSG_CHECKING([whether check_disk_size_change() is available])
+       ZFS_LINUX_TRY_COMPILE_SYMBOL([
+               #include <linux/fs.h>
+       ], [
+               check_disk_size_change(NULL, NULL);
+       ], [check_disk_size_change], [fs/block_dev.c], [
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_CHECK_DISK_SIZE_CHANGE, 1,
+                         [check_disk_size_change() is available])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
 ])
index e3eace2b26a7d79691ca63d98679f07f35955c8b..8d880fcd8f50a2351742a04f822dc245476939d3 100644 (file)
@@ -19,11 +19,16 @@ dnl # Therefore, to ensure we have the correct API we only allow the
 dnl # clear_inode() compatibility code to be defined iff the evict_inode()
 dnl # functionality is also detected.
 dnl #
-AC_DEFUN([ZFS_AC_KERNEL_CLEAR_INODE], [
-       ZFS_CHECK_SYMBOL_EXPORT(
-               [clear_inode],
-               [fs/inode.c],
-               [AC_DEFINE(HAVE_CLEAR_INODE, 1,
-               [clear_inode() is available])],
-               [])
+AC_DEFUN([ZFS_AC_KERNEL_CLEAR_INODE],
+       [AC_MSG_CHECKING([whether clear_inode() is available])
+       ZFS_LINUX_TRY_COMPILE_SYMBOL([
+               #include <linux/fs.h>
+       ], [
+               clear_inode(NULL);
+       ], [clear_inode], [fs/inode.c], [
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_CLEAR_INODE, 1, [clear_inode() is available])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
 ])
index fd2c52d74a4024700d86485716cd10a5b53e7008..9c2b73dcbf5912682bd6d4f3c535b074b667ccdd 100644 (file)
@@ -2,11 +2,16 @@ dnl #
 dnl # 3.4.0 API change
 dnl # Added d_make_root() to replace previous d_alloc_root() function.
 dnl #
-AC_DEFUN([ZFS_AC_KERNEL_D_MAKE_ROOT], [
-       ZFS_CHECK_SYMBOL_EXPORT(
-               [d_make_root],
-               [fs/dcache.c],
-               [AC_DEFINE(HAVE_D_MAKE_ROOT, 1,
-               [d_make_root() is available])],
-               [])
+AC_DEFUN([ZFS_AC_KERNEL_D_MAKE_ROOT],
+       [AC_MSG_CHECKING([whether d_make_root() is available])
+       ZFS_LINUX_TRY_COMPILE_SYMBOL([
+               #include <linux/dcache.h>
+       ], [
+               d_make_root(NULL);
+       ], [d_make_root], [fs/dcache.c], [
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_D_MAKE_ROOT, 1, [d_make_root() is available])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
 ])
index d80a1c89c4467247cba4b2cc02c3e96af05cbed1..2b4b11eccc1b906fa2110846baff15b9c08ef77b 100644 (file)
@@ -2,11 +2,17 @@ dnl #
 dnl # 2.6.28 API change
 dnl # Added d_obtain_alias() helper function.
 dnl #
-AC_DEFUN([ZFS_AC_KERNEL_D_OBTAIN_ALIAS], [
-       ZFS_CHECK_SYMBOL_EXPORT(
-               [d_obtain_alias],
-               [fs/dcache.c],
-               [AC_DEFINE(HAVE_D_OBTAIN_ALIAS, 1,
-               [d_obtain_alias() is available])],
-               [])
+AC_DEFUN([ZFS_AC_KERNEL_D_OBTAIN_ALIAS],
+       [AC_MSG_CHECKING([whether d_obtain_alias() is available])
+       ZFS_LINUX_TRY_COMPILE_SYMBOL([
+               #include <linux/dcache.h>
+       ], [
+               d_obtain_alias(NULL);
+       ], [d_obtain_alias], [fs/dcache.c], [
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_D_OBTAIN_ALIAS, 1,
+                         [d_obtain_alias() is available])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
 ])
index 8cd725f0e0b32d86d7004c88859651833c4073a4..b0913770e43d76326a070b076e99d25af78ca672 100644 (file)
@@ -1,11 +1,17 @@
 dnl #
 dnl # 2.6.34 API change
-dnl # Verify the get_gendisk() symbol is exported.
+dnl # Verify the get_gendisk() symbol is available.
 dnl #
-AC_DEFUN([ZFS_AC_KERNEL_GET_GENDISK], [
-       ZFS_CHECK_SYMBOL_EXPORT(
-               [get_gendisk],
-               [block/genhd.c],
-               [AC_DEFINE(HAVE_GET_GENDISK, 1, [get_gendisk() is available])],
-               [])
+AC_DEFUN([ZFS_AC_KERNEL_GET_GENDISK],
+       [AC_MSG_CHECKING([whether get_gendisk() is available])
+       ZFS_LINUX_TRY_COMPILE_SYMBOL([
+               #include <linux/genhd.h>
+       ], [
+               get_gendisk(0, NULL);
+       ], [get_gendisk], [block/genhd.c], [
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_GET_GENDISK, 1, [get_gendisk() is available])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
 ])
index 1faff7e642b39349554b9d79a9e87d1645a55a8a..da141d180a9e2ca0b6f6a8e293f7e86a34b27476 100644 (file)
@@ -2,11 +2,17 @@ dnl #
 dnl # 2.6.28 API change
 dnl # Added insert_inode_locked() helper function.
 dnl #
-AC_DEFUN([ZFS_AC_KERNEL_INSERT_INODE_LOCKED], [
-       ZFS_CHECK_SYMBOL_EXPORT(
-               [insert_inode_locked],
-               [fs/inode.c],
-               [AC_DEFINE(HAVE_INSERT_INODE_LOCKED, 1,
-               [insert_inode_locked() is available])],
-               [])
+AC_DEFUN([ZFS_AC_KERNEL_INSERT_INODE_LOCKED],
+       [AC_MSG_CHECKING([whether insert_inode_locked() is available])
+       ZFS_LINUX_TRY_COMPILE_SYMBOL([
+               #include <linux/fs.h>
+       ], [
+               insert_inode_locked(NULL);
+       ], [insert_inode_locked], [fs/inode.c], [
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_INSERT_INODE_LOCKED, 1,
+                         [insert_inode_locked() is available])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
 ])
index 9229d5b1bb0de643c0287067d3aaddff1e058847..28a45157e4d0fc54eabab65cd203187a3998bd5d 100644 (file)
@@ -5,11 +5,16 @@ dnl # in the file_system_type structure.  When using the new
 dnl # interface the caller must now use the mount_nodev() helper.
 dnl # This updated callback and helper no longer pass the vfsmount.
 dnl #
-AC_DEFUN([ZFS_AC_KERNEL_MOUNT_NODEV], [
-       ZFS_CHECK_SYMBOL_EXPORT(
-               [mount_nodev],
-               [fs/super.c],
-               [AC_DEFINE(HAVE_MOUNT_NODEV, 1,
-               [mount_nodev() is available])],
-               [])
+AC_DEFUN([ZFS_AC_KERNEL_MOUNT_NODEV],
+       [AC_MSG_CHECKING([whether mount_nodev() is available])
+       ZFS_LINUX_TRY_COMPILE_SYMBOL([
+               #include <linux/fs.h>
+       ], [
+               mount_nodev(NULL, 0, NULL, NULL);
+       ], [mount_nodev], [fs/super.c], [
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_MOUNT_NODEV, 1, [mount_nodev() is available])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
 ])
index 734b2134cc43d747cfb5dc63e5a404ea4cf39e15..0661315a610febf0934885791de6ca0243ac37ea 100644 (file)
@@ -2,11 +2,17 @@ dnl #
 dnl # 2.6.28 API change
 dnl # open/close_bdev_excl() renamed to open/close_bdev_exclusive()
 dnl #
-AC_DEFUN([ZFS_AC_KERNEL_OPEN_BDEV_EXCLUSIVE], [
-       ZFS_CHECK_SYMBOL_EXPORT(
-               [open_bdev_exclusive],
-               [fs/block_dev.c],
-               [AC_DEFINE(HAVE_OPEN_BDEV_EXCLUSIVE, 1,
-               [open_bdev_exclusive() is available])],
-               [])
+AC_DEFUN([ZFS_AC_KERNEL_OPEN_BDEV_EXCLUSIVE],
+       [AC_MSG_CHECKING([whether open_bdev_exclusive() is available])
+       ZFS_LINUX_TRY_COMPILE_SYMBOL([
+               #include <linux/fs.h>
+       ], [
+               open_bdev_exclusive(NULL, 0, NULL);
+       ], [open_bdev_exclusive], [fs/block_dev.c], [
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_OPEN_BDEV_EXCLUSIVE, 1,
+                         [open_bdev_exclusive() is available])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
 ])
index d8b2b47bd7de4007dead8d1548206290bd0b6a54..7e4aff479a90e0952888191c55eabd51a6bddc3e 100644 (file)
@@ -2,11 +2,17 @@ dnl #
 dnl # 2.6.35 API change
 dnl # Added truncate_setsize() helper function.
 dnl #
-AC_DEFUN([ZFS_AC_KERNEL_TRUNCATE_SETSIZE], [
-       ZFS_CHECK_SYMBOL_EXPORT(
-               [truncate_setsize],
-               [mm/truncate.c],
-               [AC_DEFINE(HAVE_TRUNCATE_SETSIZE, 1,
-               [truncate_setsize() is available])],
-               [])
+AC_DEFUN([ZFS_AC_KERNEL_TRUNCATE_SETSIZE],
+       [AC_MSG_CHECKING([whether truncate_setsize() is available])
+       ZFS_LINUX_TRY_COMPILE_SYMBOL([
+               #include <linux/mm.h>
+       ], [
+               truncate_setsize(NULL, 0);
+       ], [truncate_setsize], [mm/truncate.c], [
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_TRUNCATE_SETSIZE, 1,
+                         [truncate_setsize() is available])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
 ])
index b9c9fb9827797a4a7588e9d87d4f534b446ea3cc..a40bb5b6c1d3e92f75e57d1198613f2a11aa994e 100644 (file)
@@ -159,7 +159,7 @@ AC_DEFUN([ZFS_AC_KERNEL], [
                ], [test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}], [
                        kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu}
                ], [test -d ${kernelsrc}-obj/${target_cpu}/default], [
-                       kernelbuild=${kernelsrc}-obj/${target_cpu}/default
+                       kernelbuild=${kernelsrc}-obj/${target_cpu}/default
                ], [test -d `dirname ${kernelsrc}`/build-${target_cpu}], [
                        kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu}
                ], [
@@ -491,30 +491,48 @@ dnl #
 dnl # ZFS_CHECK_SYMBOL_EXPORT
 dnl # check symbol exported or not
 dnl #
-AC_DEFUN([ZFS_CHECK_SYMBOL_EXPORT],
-       [AC_MSG_CHECKING([whether symbol $1 is exported])
+AC_DEFUN([ZFS_CHECK_SYMBOL_EXPORT], [
        grep -q -E '[[[:space:]]]$1[[[:space:]]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
-       AS_IF([test $rc -ne 0], [
+       if test $rc -ne 0; then
                export=0
                for file in $2; do
-                       grep -q -E "EXPORT_SYMBOL.*($1)" "$LINUX/$file" 2>/dev/null
+                       grep -q -E "EXPORT_SYMBOL.*($1)" \
+                               "$LINUX/$file" 2>/dev/null
                        rc=$?
-                       AS_IF([test $rc -eq 0], [
+                       if test $rc -eq 0; then
                                export=1
                                break;
-                       ])
+                       fi
                done
-               AS_IF([test $export -eq 0], [
-                       AC_MSG_RESULT([no])
+               if test $export -eq 0; then :
                        $4
-               ], [
-                       AC_MSG_RESULT([yes])
+               else :
                        $3
-               ])
-       ], [
-               AC_MSG_RESULT([yes])
+               fi
+       else :
                $3
-       ])
+       fi
+])
+
+dnl #
+dnl # ZFS_LINUX_TRY_COMPILE_SYMBOL
+dnl # like ZFS_LINUX_TRY_COMPILE, except ZFS_CHECK_SYMBOL_EXPORT
+dnl # is called if not compiling for builtin
+dnl #
+AC_DEFUN([ZFS_LINUX_TRY_COMPILE_SYMBOL], [
+       ZFS_LINUX_TRY_COMPILE([$1], [$2], [rc=0], [rc=1])
+       if test $rc -ne 0; then :
+               $6
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+                       ZFS_CHECK_SYMBOL_EXPORT([$3], [$4], [rc=0], [rc=1])
+               fi
+               if test $rc -ne 0; then :
+                       $6
+               else :
+                       $5
+               fi
+       fi
 ])
index 5a52d9443a02f883aada9bd5beffef7139568970..9b97fb427afa589e077de0f746b4021b9fed596c 100755 (executable)
--- a/configure
+++ b/configure
@@ -12133,7 +12133,7 @@ elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then
 
 elif test -d ${kernelsrc}-obj/${target_cpu}/default; then
 
-                       kernelbuild=${kernelsrc}-obj/${target_cpu}/default
+                       kernelbuild=${kernelsrc}-obj/${target_cpu}/default
 
 elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then
 
 
 
 
+       { $as_echo "$as_me:$LINENO: checking whether blkdev_get_by_path() is available" >&5
+$as_echo_n "checking whether blkdev_get_by_path() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               blkdev_get_by_path(NULL, 0, NULL);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol blkdev_get_by_path is exported" >&5
-$as_echo_n "checking whether symbol blkdev_get_by_path is exported... " >&6; }
        grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
-
                export=0
                for file in fs/block_dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" "$LINUX/$file" 2>/dev/null
+                       grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" \
+                               "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
-
                                export=1
                                break;
-
-fi
-
+                       fi
                done
-               if test $export -eq 0; then
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-else
+               else :
 
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
@@ -13045,63 +13111,103 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
-fi
+               fi
+       fi
 
 
-else
+       { $as_echo "$as_me:$LINENO: checking whether open_bdev_exclusive() is available" >&5
+$as_echo_n "checking whether open_bdev_exclusive() is available... " >&6; }
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLKDEV_GET_BY_PATH 1
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               open_bdev_exclusive(NULL, 0, NULL);
+
+  ;
+  return 0;
+}
+
 _ACEOF
 
 
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
 fi
 
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol open_bdev_exclusive is exported" >&5
-$as_echo_n "checking whether symbol open_bdev_exclusive is exported... " >&6; }
        grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
-
                export=0
                for file in fs/block_dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(open_bdev_exclusive)" "$LINUX/$file" 2>/dev/null
+                       grep -q -E "EXPORT_SYMBOL.*(open_bdev_exclusive)" \
+                               "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
-
                                export=1
                                break;
-
-fi
-
+                       fi
                done
-               if test $export -eq 0; then
-
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-
-else
-
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_OPEN_BDEV_EXCLUSIVE 1
-_ACEOF
-
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
-fi
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-else
+               else :
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -13111,8 +13217,8 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
-fi
-
+               fi
+       fi
 
 
 
 
        EXTRA_KCFLAGS="$tmp_flags"
 
+       { $as_echo "$as_me:$LINENO: checking whether get_gendisk() is available" >&5
+$as_echo_n "checking whether get_gendisk() is available... " >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol get_gendisk is exported" >&5
-$as_echo_n "checking whether symbol get_gendisk is exported... " >&6; }
-       grep -q -E '[[:space:]]get_gendisk[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-
-               export=0
-               for file in block/genhd.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(get_gendisk)" "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
 
-                               export=1
-                               break;
 
-fi
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-               done
-               if test $export -eq 0; then
 
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               #include <linux/genhd.h>
 
+int
+main (void)
+{
 
-else
+               get_gendisk(0, NULL);
 
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  ;
+  return 0;
+}
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GET_GENDISK 1
 _ACEOF
 
 
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
 fi
 
+       rm -Rf build
 
-else
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]get_gendisk[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in block/genhd.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(get_gendisk)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -15062,8 +15221,8 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
-fi
-
+               fi
+       fi
 
 
 
 
 
 
+       { $as_echo "$as_me:$LINENO: checking whether clear_inode() is available" >&5
+$as_echo_n "checking whether clear_inode() is available... " >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol clear_inode is exported" >&5
-$as_echo_n "checking whether symbol clear_inode is exported... " >&6; }
-       grep -q -E '[[:space:]]clear_inode[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-
-               export=0
-               for file in fs/inode.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(clear_inode)" "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-
-                               export=1
-                               break;
-
-fi
 
-               done
-               if test $export -eq 0; then
 
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 
-else
+               #include <linux/fs.h>
 
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+int
+main (void)
+{
+
+               clear_inode(NULL);
+
+  ;
+  return 0;
+}
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CLEAR_INODE 1
 _ACEOF
 
 
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
 fi
 
+       rm -Rf build
 
-else
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]clear_inode[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/inode.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(clear_inode)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -16660,39 +16872,105 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
+               fi
+       fi
+
+
+       { $as_echo "$as_me:$LINENO: checking whether insert_inode_locked() is available" >&5
+$as_echo_n "checking whether insert_inode_locked() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               insert_inode_locked(NULL);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
 fi
 
+       rm -Rf build
 
 
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol insert_inode_locked is exported" >&5
-$as_echo_n "checking whether symbol insert_inode_locked is exported... " >&6; }
        grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
-
                export=0
                for file in fs/inode.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" "$LINUX/$file" 2>/dev/null
+                       grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" \
+                               "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
-
                                export=1
                                break;
-
-fi
-
+                       fi
                done
-               if test $export -eq 0; then
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-else
+               else :
 
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
@@ -16700,52 +16978,105 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
-fi
+               fi
+       fi
 
 
-else
+       { $as_echo "$as_me:$LINENO: checking whether d_make_root() is available" >&5
+$as_echo_n "checking whether d_make_root() is available... " >&6; }
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INSERT_INODE_LOCKED 1
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/dcache.h>
+
+int
+main (void)
+{
+
+               d_make_root(NULL);
+
+  ;
+  return 0;
+}
+
 _ACEOF
 
 
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
 fi
 
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol d_make_root is exported" >&5
-$as_echo_n "checking whether symbol d_make_root is exported... " >&6; }
        grep -q -E '[[:space:]]d_make_root[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
-
                export=0
                for file in fs/dcache.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(d_make_root)" "$LINUX/$file" 2>/dev/null
+                       grep -q -E "EXPORT_SYMBOL.*(d_make_root)" \
+                               "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
-
                                export=1
                                break;
-
-fi
-
+                       fi
                done
-               if test $export -eq 0; then
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-else
+               else :
 
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
@@ -16753,52 +17084,105 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
-fi
+               fi
+       fi
 
 
-else
+       { $as_echo "$as_me:$LINENO: checking whether d_obtain_alias() is available" >&5
+$as_echo_n "checking whether d_obtain_alias() is available... " >&6; }
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_D_MAKE_ROOT 1
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
 _ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/dcache.h>
+
+int
+main (void)
+{
+
+               d_obtain_alias(NULL);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
 
 fi
 
+       rm -Rf build
+
 
+       if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol d_obtain_alias is exported" >&5
-$as_echo_n "checking whether symbol d_obtain_alias is exported... " >&6; }
        grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
-
                export=0
                for file in fs/dcache.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" "$LINUX/$file" 2>/dev/null
+                       grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" \
+                               "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
-
                                export=1
                                break;
-
-fi
-
+                       fi
                done
-               if test $export -eq 0; then
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-else
+               else :
 
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
@@ -16806,52 +17190,105 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
-fi
+               fi
+       fi
+
+
+       { $as_echo "$as_me:$LINENO: checking whether check_disk_size_change() is available" >&5
+$as_echo_n "checking whether check_disk_size_change() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               check_disk_size_change(NULL, NULL);
 
+  ;
+  return 0;
+}
+
+_ACEOF
 
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
 else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_D_OBTAIN_ALIAS 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-fi
 
+       if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol check_disk_size_change is exported" >&5
-$as_echo_n "checking whether symbol check_disk_size_change is exported... " >&6; }
        grep -q -E '[[:space:]]check_disk_size_change[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
-
                export=0
                for file in fs/block_dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" "$LINUX/$file" 2>/dev/null
+                       grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" \
+                               "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
-
                                export=1
                                break;
-
-fi
-
+                       fi
                done
-               if test $export -eq 0; then
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-else
+               else :
 
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
@@ -16859,63 +17296,103 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
-fi
+               fi
+       fi
 
 
-else
+       { $as_echo "$as_me:$LINENO: checking whether truncate_setsize() is available" >&5
+$as_echo_n "checking whether truncate_setsize() is available... " >&6; }
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CHECK_DISK_SIZE_CHANGE 1
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/mm.h>
+
+int
+main (void)
+{
+
+               truncate_setsize(NULL, 0);
+
+  ;
+  return 0;
+}
+
 _ACEOF
 
 
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
 fi
 
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol truncate_setsize is exported" >&5
-$as_echo_n "checking whether symbol truncate_setsize is exported... " >&6; }
        grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
-
                export=0
                for file in mm/truncate.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" "$LINUX/$file" 2>/dev/null
+                       grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" \
+                               "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
-
                                export=1
                                break;
-
-fi
-
+                       fi
                done
-               if test $export -eq 0; then
-
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-
-else
-
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TRUNCATE_SETSIZE 1
-_ACEOF
-
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
-fi
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-else
+               else :
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -16925,8 +17402,8 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
-fi
-
+               fi
+       fi
 
 
 
 
        EXTRA_KCFLAGS="$tmp_flags"
 
+       { $as_echo "$as_me:$LINENO: checking whether mount_nodev() is available" >&5
+$as_echo_n "checking whether mount_nodev() is available... " >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol mount_nodev is exported" >&5
-$as_echo_n "checking whether symbol mount_nodev is exported... " >&6; }
-       grep -q -E '[[:space:]]mount_nodev[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-
-               export=0
-               for file in fs/super.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
 
-                               export=1
-                               break;
 
-fi
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-               done
-               if test $export -eq 0; then
 
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               #include <linux/fs.h>
 
+int
+main (void)
+{
 
-else
+               mount_nodev(NULL, 0, NULL, NULL);
 
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  ;
+  return 0;
+}
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MOUNT_NODEV 1
 _ACEOF
 
 
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
 fi
 
+       rm -Rf build
+
 
-else
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]mount_nodev[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/super.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -17130,8 +17660,8 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
-fi
-
+               fi
+       fi
 
 
 
 
 
 
+       { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() is available" >&5
+$as_echo_n "checking whether bdi_setup_and_register() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/backing-dev.h>
+
+int
+main (void)
+{
+
+               bdi_setup_and_register(NULL, NULL, 0);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol bdi_setup_and_register is exported" >&5
-$as_echo_n "checking whether symbol bdi_setup_and_register is exported... " >&6; }
        grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
-
                export=0
                for file in mm/backing-dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" "$LINUX/$file" 2>/dev/null
+                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+                               "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
-
                                export=1
                                break;
-
-fi
-
+                       fi
                done
-               if test $export -eq 0; then
-
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-
-else
-
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BDI_SETUP_AND_REGISTER 1
-_ACEOF
-
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
-fi
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-else
+               else :
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -17325,8 +17908,8 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
-fi
-
+               fi
+       fi
 
 
 
@@ -19054,7 +19637,7 @@ elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then
 
 elif test -d ${kernelsrc}-obj/${target_cpu}/default; then
 
-                       kernelbuild=${kernelsrc}-obj/${target_cpu}/default
+                       kernelbuild=${kernelsrc}-obj/${target_cpu}/default
 
 elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then
 
 
 
 
+       { $as_echo "$as_me:$LINENO: checking whether blkdev_get_by_path() is available" >&5
+$as_echo_n "checking whether blkdev_get_by_path() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               blkdev_get_by_path(NULL, 0, NULL);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol blkdev_get_by_path is exported" >&5
-$as_echo_n "checking whether symbol blkdev_get_by_path is exported... " >&6; }
        grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
-
                export=0
                for file in fs/block_dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" "$LINUX/$file" 2>/dev/null
+                       grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" \
+                               "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
-
                                export=1
                                break;
-
-fi
-
+                       fi
                done
-               if test $export -eq 0; then
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-else
+               else :
 
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
@@ -19966,63 +20615,103 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
-fi
+               fi
+       fi
 
 
-else
+       { $as_echo "$as_me:$LINENO: checking whether open_bdev_exclusive() is available" >&5
+$as_echo_n "checking whether open_bdev_exclusive() is available... " >&6; }
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLKDEV_GET_BY_PATH 1
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               open_bdev_exclusive(NULL, 0, NULL);
+
+  ;
+  return 0;
+}
+
 _ACEOF
 
 
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
 fi
 
+       rm -Rf build
+
 
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol open_bdev_exclusive is exported" >&5
-$as_echo_n "checking whether symbol open_bdev_exclusive is exported... " >&6; }
        grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
-
                export=0
                for file in fs/block_dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(open_bdev_exclusive)" "$LINUX/$file" 2>/dev/null
+                       grep -q -E "EXPORT_SYMBOL.*(open_bdev_exclusive)" \
+                               "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
-
                                export=1
                                break;
-
-fi
-
+                       fi
                done
-               if test $export -eq 0; then
-
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-
-else
-
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_OPEN_BDEV_EXCLUSIVE 1
-_ACEOF
-
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
-fi
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-else
+               else :
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -20032,8 +20721,8 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
-fi
-
+               fi
+       fi
 
 
 
 
        EXTRA_KCFLAGS="$tmp_flags"
 
+       { $as_echo "$as_me:$LINENO: checking whether get_gendisk() is available" >&5
+$as_echo_n "checking whether get_gendisk() is available... " >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol get_gendisk is exported" >&5
-$as_echo_n "checking whether symbol get_gendisk is exported... " >&6; }
-       grep -q -E '[[:space:]]get_gendisk[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
 
-               export=0
-               for file in block/genhd.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(get_gendisk)" "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
 
-                               export=1
-                               break;
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-fi
 
-               done
-               if test $export -eq 0; then
+               #include <linux/genhd.h>
 
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+int
+main (void)
+{
 
+               get_gendisk(0, NULL);
 
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
 else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GET_GENDISK 1
-_ACEOF
+fi
+
+       rm -Rf build
 
 
-fi
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]get_gendisk[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in block/genhd.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(get_gendisk)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-else
+               else :
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -21983,8 +22725,8 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
-fi
-
+               fi
+       fi
 
 
 
@@ -23455,15 +24197,298 @@ $as_echo "no" >&6; }
 
 
 
-fi
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether eops->encode_fh() wants inode" >&5
+$as_echo_n "checking whether eops->encode_fh() wants inode... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/exportfs.h>
+               int encode_fh(struct inode *inode, __u32 *fh, int *max_len,
+                             struct inode *parent) { return 0; }
+               static struct export_operations eops __attribute__ ((unused))={
+                       .encode_fh = encode_fh,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ENCODE_FH_WITH_INODE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether clear_inode() is available" >&5
+$as_echo_n "checking whether clear_inode() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               clear_inode(NULL);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]clear_inode[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/inode.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(clear_inode)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CLEAR_INODE 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+       { $as_echo "$as_me:$LINENO: checking whether insert_inode_locked() is available" >&5
+$as_echo_n "checking whether insert_inode_locked() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               insert_inode_locked(NULL);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/inode.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INSERT_INODE_LOCKED 1
+_ACEOF
 
-       rm -Rf build
 
+               fi
+       fi
 
 
+       { $as_echo "$as_me:$LINENO: checking whether d_make_root() is available" >&5
+$as_echo_n "checking whether d_make_root() is available... " >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether eops->encode_fh() wants inode" >&5
-$as_echo_n "checking whether eops->encode_fh() wants inode... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -23474,17 +24499,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/exportfs.h>
-               int encode_fh(struct inode *inode, __u32 *fh, int *max_len,
-                             struct inode *parent) { return 0; }
-               static struct export_operations eops __attribute__ ((unused))={
-                       .encode_fh = encode_fh,
-               };
+               #include <linux/dcache.h>
 
 int
 main (void)
 {
 
+               d_make_root(NULL);
 
   ;
   return 0;
@@ -23508,22 +24529,11 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ENCODE_FH_WITH_INODE 1
-_ACEOF
-
-
+  rc=0
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
+ rc=1
 
 
 fi
        rm -Rf build
 
 
+       if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol clear_inode is exported" >&5
-$as_echo_n "checking whether symbol clear_inode is exported... " >&6; }
-       grep -q -E '[[:space:]]clear_inode[[:space:]]' \
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]d_make_root[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
-
                export=0
-               for file in fs/inode.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(clear_inode)" "$LINUX/$file" 2>/dev/null
+               for file in fs/dcache.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(d_make_root)" \
+                               "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
-
                                export=1
                                break;
-
-fi
-
+                       fi
                done
-               if test $export -eq 0; then
-
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-
-else
-
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CLEAR_INODE 1
-_ACEOF
-
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
-fi
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-else
+               else :
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_CLEAR_INODE 1
+#define HAVE_D_MAKE_ROOT 1
 _ACEOF
 
 
-fi
-
-
+               fi
+       fi
 
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol insert_inode_locked is exported" >&5
-$as_echo_n "checking whether symbol insert_inode_locked is exported... " >&6; }
-       grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
+       { $as_echo "$as_me:$LINENO: checking whether d_obtain_alias() is available" >&5
+$as_echo_n "checking whether d_obtain_alias() is available... " >&6; }
 
-               export=0
-               for file in fs/inode.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
 
-                               export=1
-                               break;
 
-fi
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-               done
-               if test $export -eq 0; then
 
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               #include <linux/dcache.h>
 
+int
+main (void)
+{
 
-else
+               d_obtain_alias(NULL);
 
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  ;
+  return 0;
+}
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INSERT_INODE_LOCKED 1
 _ACEOF
 
 
-fi
-
-
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
 else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INSERT_INODE_LOCKED 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-fi
 
+       if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol d_make_root is exported" >&5
-$as_echo_n "checking whether symbol d_make_root is exported... " >&6; }
-       grep -q -E '[[:space:]]d_make_root[[:space:]]' \
+       grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
-
                export=0
                for file in fs/dcache.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(d_make_root)" "$LINUX/$file" 2>/dev/null
+                       grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" \
+                               "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
-
                                export=1
                                break;
-
-fi
-
+                       fi
                done
-               if test $export -eq 0; then
-
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-
-else
-
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_D_MAKE_ROOT 1
-_ACEOF
-
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
-fi
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-else
+               else :
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_D_MAKE_ROOT 1
+#define HAVE_D_OBTAIN_ALIAS 1
 _ACEOF
 
 
-fi
-
-
+               fi
+       fi
 
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol d_obtain_alias is exported" >&5
-$as_echo_n "checking whether symbol d_obtain_alias is exported... " >&6; }
-       grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
+       { $as_echo "$as_me:$LINENO: checking whether check_disk_size_change() is available" >&5
+$as_echo_n "checking whether check_disk_size_change() is available... " >&6; }
 
-               export=0
-               for file in fs/dcache.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
 
-                               export=1
-                               break;
 
-fi
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-               done
-               if test $export -eq 0; then
 
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               #include <linux/fs.h>
 
+int
+main (void)
+{
 
-else
+               check_disk_size_change(NULL, NULL);
 
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  ;
+  return 0;
+}
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_D_OBTAIN_ALIAS 1
 _ACEOF
 
 
-fi
-
-
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
 else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_D_OBTAIN_ALIAS 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-fi
 
+       if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol check_disk_size_change is exported" >&5
-$as_echo_n "checking whether symbol check_disk_size_change is exported... " >&6; }
        grep -q -E '[[:space:]]check_disk_size_change[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
-
                export=0
                for file in fs/block_dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" "$LINUX/$file" 2>/dev/null
+                       grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" \
+                               "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
-
                                export=1
                                break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CHECK_DISK_SIZE_CHANGE 1
+_ACEOF
 
-fi
 
-               done
-               if test $export -eq 0; then
+               fi
+       fi
 
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
 
+       { $as_echo "$as_me:$LINENO: checking whether truncate_setsize() is available" >&5
+$as_echo_n "checking whether truncate_setsize() is available... " >&6; }
 
-else
 
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CHECK_DISK_SIZE_CHANGE 1
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
 _ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 
-fi
+               #include <linux/mm.h>
 
+int
+main (void)
+{
 
-else
+               truncate_setsize(NULL, 0);
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  ;
+  return 0;
+}
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CHECK_DISK_SIZE_CHANGE 1
 _ACEOF
 
 
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
 fi
 
+       rm -Rf build
+
 
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol truncate_setsize is exported" >&5
-$as_echo_n "checking whether symbol truncate_setsize is exported... " >&6; }
        grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
-
                export=0
                for file in mm/truncate.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" "$LINUX/$file" 2>/dev/null
+                       grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" \
+                               "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
-
                                export=1
                                break;
-
-fi
-
+                       fi
                done
-               if test $export -eq 0; then
-
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-
-else
-
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TRUNCATE_SETSIZE 1
-_ACEOF
-
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
-fi
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-else
+               else :
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -23846,8 +24906,8 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
-fi
-
+               fi
+       fi
 
 
 
 
        EXTRA_KCFLAGS="$tmp_flags"
 
+       { $as_echo "$as_me:$LINENO: checking whether mount_nodev() is available" >&5
+$as_echo_n "checking whether mount_nodev() is available... " >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol mount_nodev is exported" >&5
-$as_echo_n "checking whether symbol mount_nodev is exported... " >&6; }
-       grep -q -E '[[:space:]]mount_nodev[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-
-               export=0
-               for file in fs/super.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
 
-                               export=1
-                               break;
 
-fi
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-               done
-               if test $export -eq 0; then
 
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               #include <linux/fs.h>
 
+int
+main (void)
+{
 
-else
+               mount_nodev(NULL, 0, NULL, NULL);
 
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  ;
+  return 0;
+}
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MOUNT_NODEV 1
 _ACEOF
 
 
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
 fi
 
+       rm -Rf build
 
-else
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]mount_nodev[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/super.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -24051,8 +25164,8 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
-fi
-
+               fi
+       fi
 
 
 
 
 
 
+       { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() is available" >&5
+$as_echo_n "checking whether bdi_setup_and_register() is available... " >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol bdi_setup_and_register is exported" >&5
-$as_echo_n "checking whether symbol bdi_setup_and_register is exported... " >&6; }
-       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-
-               export=0
-               for file in mm/backing-dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
 
-                               export=1
-                               break;
 
-fi
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-               done
-               if test $export -eq 0; then
 
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               #include <linux/backing-dev.h>
 
+int
+main (void)
+{
 
-else
+               bdi_setup_and_register(NULL, NULL, 0);
 
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  ;
+  return 0;
+}
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BDI_SETUP_AND_REGISTER 1
 _ACEOF
 
 
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
 fi
 
+       rm -Rf build
+
 
-else
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in mm/backing-dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -24246,8 +25412,8 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
-fi
-
+               fi
+       fi