summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorNed Bass <[email protected]>2014-08-08 17:41:22 -0700
committerBrian Behlendorf <[email protected]>2014-08-11 14:17:00 -0700
commit2fc44f66ec9b83069593d87cf311069458c0d5ae (patch)
treea809b993c5c6153f8b101cecfa43d7655532f0ea /config
parentf2297b5a8932594a45c99d3d01b0d53a16ea9753 (diff)
Linux 3.17 compat: remove wait_on_bit action function
Linux kernel 3.17 removes the action function argument from wait_on_bit(). Add autoconf test and compatibility macro to support the new interface. The former "wait_on_bit" interface required an 'action' function to be provided which does the actual waiting. There were over 20 such functions in the kernel, many of them identical, though most cases can be satisfied by one of just two functions: one which uses io_schedule() and one which just uses schedule(). This API change was made to consolidate all of those redundant wait functions. References: torvalds/linux@7431620 Signed-off-by: Ned Bass <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #378
Diffstat (limited to 'config')
-rw-r--r--config/spl-build.m426
1 files changed, 26 insertions, 0 deletions
diff --git a/config/spl-build.m4 b/config/spl-build.m4
index eef52334f..2514d8c5b 100644
--- a/config/spl-build.m4
+++ b/config/spl-build.m4
@@ -94,6 +94,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
SPL_AC_2ARGS_VFS_GETATTR
SPL_AC_USLEEP_RANGE
SPL_AC_KMEM_CACHE_ALLOCFLAGS
+ SPL_AC_WAIT_ON_BIT
])
AC_DEFUN([SPL_AC_MODULE_SYMVERS], [
@@ -2570,3 +2571,28 @@ AC_DEFUN([SPL_AC_KMEM_CACHE_ALLOCFLAGS], [
])
])
])
+
+dnl #
+dnl # 3.17 API change,
+dnl # wait_on_bit() no longer requires an action argument. The former
+dnl # "wait_on_bit" interface required an 'action' function to be provided
+dnl # which does the actual waiting. There were over 20 such functions in the
+dnl # kernel, many of them identical, though most cases can be satisfied by one
+dnl # of just two functions: one which uses io_schedule() and one which just
+dnl # uses schedule(). This API change was made to consolidate all of those
+dnl # redundant wait functions.
+dnl #
+AC_DEFUN([SPL_AC_WAIT_ON_BIT], [
+ AC_MSG_CHECKING([whether wait_on_bit() takes an action])
+ SPL_LINUX_TRY_COMPILE([
+ #include <linux/wait.h>
+ ],[
+ int (*action)(void *) = NULL;
+ wait_on_bit(NULL, 0, action, 0);
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_WAIT_ON_BIT_ACTION, 1, [yes])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])