aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/kernel-bdi-setup-and-register.m415
-rw-r--r--config/kernel.m41
2 files changed, 16 insertions, 0 deletions
diff --git a/config/kernel-bdi-setup-and-register.m4 b/config/kernel-bdi-setup-and-register.m4
new file mode 100644
index 000000000..56fab8757
--- /dev/null
+++ b/config/kernel-bdi-setup-and-register.m4
@@ -0,0 +1,15 @@
+dnl #
+dnl # 2.6.34 API change
+dnl # The bdi_setup_and_register() helper function is avilable and
+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])],
+ [])
+])
diff --git a/config/kernel.m4 b/config/kernel.m4
index 5490c8733..fec157a0c 100644
--- a/config/kernel.m4
+++ b/config/kernel.m4
@@ -41,6 +41,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
ZFS_AC_KERNEL_6ARGS_SECURITY_INODE_INIT_SECURITY
ZFS_AC_KERNEL_MOUNT_NODEV
ZFS_AC_KERNEL_BDI
+ ZFS_AC_KERNEL_BDI_SETUP_AND_REGISTER
AS_IF([test "$LINUX_OBJ" != "$LINUX"], [
KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"