diff --git a/config/kernel-timer.m4 b/config/kernel-timer.m4 deleted file mode 100644 index 78574318e..000000000 --- a/config/kernel-timer.m4 +++ /dev/null @@ -1,42 +0,0 @@ -dnl # 4.14-rc3 API change -dnl # https://lwn.net/Articles/735887/ -dnl # -dnl # Check if timer_list.func get passed a timer_list or an unsigned long -dnl # (older kernels). Also sanity check the from_timer() and timer_setup() -dnl # macros are available as well, since they will be used in the same newer -dnl # kernels that support the new timer_list.func signature. -dnl # -dnl # Also check for the existence of flags in struct timer_list, they were -dnl # added in 4.1-rc8 via 0eeda71bc30d. -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_TIMER_SETUP], [ - ZFS_LINUX_TEST_SRC([timer_setup], [ - #include - - struct my_task_timer { - struct timer_list timer; - int data; - }; - - static void task_expire(struct timer_list *tl) - { - struct my_task_timer *task_timer = - from_timer(task_timer, tl, timer); - task_timer->data = 42; - } - ],[ - struct my_task_timer task_timer; - timer_setup(&task_timer.timer, task_expire, 0); - ]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_TIMER_SETUP], [ - AC_MSG_CHECKING([whether timer_setup() is available]) - ZFS_LINUX_TEST_RESULT([timer_setup], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KERNEL_TIMER_SETUP, 1, - [timer_setup() is available]) - ],[ - AC_MSG_RESULT(no) - ]) -]) diff --git a/config/kernel.m4 b/config/kernel.m4 index 1ac218583..eaaa70228 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -50,7 +50,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [ ZFS_AC_KERNEL_SRC_VMALLOC_PAGE_KERNEL ZFS_AC_KERNEL_SRC_WAIT ZFS_AC_KERNEL_SRC_INODE_TIMES - ZFS_AC_KERNEL_SRC_TIMER_SETUP ZFS_AC_KERNEL_SRC_PROC_OPERATIONS ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS ZFS_AC_KERNEL_SRC_BIO @@ -169,7 +168,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [ ZFS_AC_KERNEL_VMALLOC_PAGE_KERNEL ZFS_AC_KERNEL_WAIT ZFS_AC_KERNEL_INODE_TIMES - ZFS_AC_KERNEL_TIMER_SETUP ZFS_AC_KERNEL_PROC_OPERATIONS ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS ZFS_AC_KERNEL_BIO diff --git a/include/os/linux/spl/sys/timer.h b/include/os/linux/spl/sys/timer.h index 67ee4a455..61a1fa6ae 100644 --- a/include/os/linux/spl/sys/timer.h +++ b/include/os/linux/spl/sys/timer.h @@ -62,18 +62,4 @@ container_of(timer, typeof(*var), timer_field) #endif -typedef struct timer_list *spl_timer_list_t; - -#ifndef HAVE_KERNEL_TIMER_SETUP - -static inline void -timer_setup(struct timer_list *timer, void (*func)(spl_timer_list_t), u32 fl) -{ - (timer)->flags = fl; - init_timer(timer); - setup_timer(timer, func, (spl_timer_list_t)(timer)); -} - -#endif /* HAVE_KERNEL_TIMER_SETUP */ - #endif /* _SPL_TIMER_H */ diff --git a/module/os/linux/spl/spl-taskq.c b/module/os/linux/spl/spl-taskq.c index 1c35cf3e4..7f6780909 100644 --- a/module/os/linux/spl/spl-taskq.c +++ b/module/os/linux/spl/spl-taskq.c @@ -262,7 +262,7 @@ task_expire_impl(taskq_ent_t *t) } static void -task_expire(spl_timer_list_t tl) +task_expire(struct timer_list *tl) { struct timer_list *tmr = (struct timer_list *)tl; taskq_ent_t *t = from_timer(t, tmr, tqent_timer);