mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-27 10:24:22 +03:00
config: remove HAVE_WAIT_ON_BIT_ACTION
Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #16479
This commit is contained in:
parent
a987057c67
commit
eb73000dbb
@ -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 <linux/wait.h>
|
||||
],[
|
||||
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
|
||||
])
|
||||
|
@ -27,22 +27,6 @@
|
||||
#include <linux/sched.h>
|
||||
#include <linux/wait.h>
|
||||
|
||||
#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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user