diff --git a/config/kernel-wait.m4 b/config/kernel-wait.m4 index 0414242bf..dbc6b423d 100644 --- a/config/kernel-wait.m4 +++ b/config/kernel-wait.m4 @@ -21,35 +21,6 @@ AC_DEFUN([ZFS_AC_KERNEL_WAIT_QUEUE_ENTRY_T], [ ]) ]) -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([ZFS_AC_KERNEL_SRC_WAIT_ON_BIT], [ - ZFS_LINUX_TEST_SRC([wait_on_bit], [ - #include - ],[ - int (*action)(void *) = NULL; - wait_on_bit(NULL, 0, action, 0); - ]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_WAIT_ON_BIT], [ - AC_MSG_CHECKING([whether wait_on_bit() takes an action]) - ZFS_LINUX_TEST_RESULT([wait_on_bit], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_WAIT_ON_BIT_ACTION, 1, [yes]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 4.13 API change dnl # Renamed wait_queue_head::task_list -> wait_queue_head::head @@ -89,11 +60,9 @@ AC_DEFUN([ZFS_AC_KERNEL_WAIT_QUEUE_HEAD_ENTRY], [ ]) AC_DEFUN([ZFS_AC_KERNEL_SRC_WAIT], [ - ZFS_AC_KERNEL_SRC_WAIT_ON_BIT ZFS_AC_KERNEL_SRC_WAIT_QUEUE_HEAD_ENTRY ]) AC_DEFUN([ZFS_AC_KERNEL_WAIT], [ - ZFS_AC_KERNEL_WAIT_ON_BIT ZFS_AC_KERNEL_WAIT_QUEUE_HEAD_ENTRY ]) diff --git a/include/os/linux/spl/sys/wait.h b/include/os/linux/spl/sys/wait.h index 65cd83e5e..da30ccdf6 100644 --- a/include/os/linux/spl/sys/wait.h +++ b/include/os/linux/spl/sys/wait.h @@ -27,22 +27,6 @@ #include #include -#ifndef HAVE_WAIT_ON_BIT_ACTION -#define spl_wait_on_bit(word, bit, mode) wait_on_bit(word, bit, mode) -#else - -static inline int -spl_bit_wait(void *word) -{ - schedule(); - return (0); -} - -#define spl_wait_on_bit(word, bit, mode) \ - wait_on_bit(word, bit, spl_bit_wait, mode) - -#endif /* HAVE_WAIT_ON_BIT_ACTION */ - #ifdef HAVE_WAIT_QUEUE_ENTRY_T typedef wait_queue_head_t spl_wait_queue_head_t; typedef wait_queue_entry_t spl_wait_queue_entry_t; diff --git a/module/os/linux/spl/spl-kmem-cache.c b/module/os/linux/spl/spl-kmem-cache.c index 96b61daf4..7596f97b4 100644 --- a/module/os/linux/spl/spl-kmem-cache.c +++ b/module/os/linux/spl/spl-kmem-cache.c @@ -1022,7 +1022,7 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) * then return so the local magazine can be rechecked for new objects. */ if (test_bit(KMC_BIT_REAPING, &skc->skc_flags)) { - rc = spl_wait_on_bit(&skc->skc_flags, KMC_BIT_REAPING, + rc = wait_on_bit(&skc->skc_flags, KMC_BIT_REAPING, TASK_UNINTERRUPTIBLE); return (rc ? rc : -EAGAIN); }