mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
Linux 4.13 compat: wait queues
Commit torvalds/linux@ac6424b9 - Renamed struct wait_queue -> struct wait_queue_entry. Commit torvalds/linux@2055da97 - Renamed wait_queue_head::task_list -> wait_queue_head::head - Renamed wait_queue_entry::task_list -> wait_queue_entry::entry Reviewed-by: Chunwei Chen <david.chen@osnexus.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #629
This commit is contained in:
@@ -53,6 +53,8 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
|
||||
SPL_AC_INODE_LOCK
|
||||
SPL_AC_GROUP_INFO_GID
|
||||
SPL_AC_KMEM_CACHE_CREATE_USERCOPY
|
||||
SPL_AC_WAIT_QUEUE_ENTRY_T
|
||||
SPL_AC_WAIT_QUEUE_HEAD_ENTRY
|
||||
])
|
||||
|
||||
AC_DEFUN([SPL_AC_MODULE_SYMVERS], [
|
||||
@@ -1670,3 +1672,56 @@ AC_DEFUN([SPL_AC_KMEM_CACHE_CREATE_USERCOPY], [
|
||||
])
|
||||
EXTRA_KCFLAGS="$tmp_flags"
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 4.13 API change
|
||||
dnl # Renamed struct wait_queue -> struct wait_queue_entry.
|
||||
dnl #
|
||||
AC_DEFUN([SPL_AC_WAIT_QUEUE_ENTRY_T], [
|
||||
AC_MSG_CHECKING([whether wait_queue_entry_t exists])
|
||||
SPL_LINUX_TRY_COMPILE([
|
||||
#include <linux/wait.h>
|
||||
],[
|
||||
wait_queue_entry_t *entry __attribute__ ((unused));
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_WAIT_QUEUE_ENTRY_T, 1,
|
||||
[wait_queue_entry_t exists])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 4.13 API change
|
||||
dnl # Renamed wait_queue_head::task_list -> wait_queue_head::head
|
||||
dnl # Renamed wait_queue_entry::task_list -> wait_queue_entry::entry
|
||||
dnl #
|
||||
AC_DEFUN([SPL_AC_WAIT_QUEUE_HEAD_ENTRY], [
|
||||
AC_MSG_CHECKING([whether wq_head->head and wq_entry->entry exist])
|
||||
SPL_LINUX_TRY_COMPILE([
|
||||
#include <linux/wait.h>
|
||||
|
||||
#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;
|
||||
#else
|
||||
typedef wait_queue_head_t spl_wait_queue_head_t;
|
||||
typedef wait_queue_t spl_wait_queue_entry_t;
|
||||
#endif
|
||||
],[
|
||||
spl_wait_queue_head_t wq_head;
|
||||
spl_wait_queue_entry_t wq_entry;
|
||||
struct list_head *head __attribute__ ((unused));
|
||||
struct list_head *entry __attribute__ ((unused));
|
||||
|
||||
head = &wq_head.head;
|
||||
entry = &wq_entry.entry;
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_WAIT_QUEUE_HEAD_ENTRY, 1,
|
||||
[wq_head->head and wq_entry->entry exist])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user