Allow dsl_deadlist_open() return errors
[zfs.git] / config / kernel-percpu.m4
blob12e81892cb6b5b91d9044ecb4bb0b574ca6a2960
1 dnl #
2 dnl # 5.10 API change,
3 dnl # The "count" was moved into ref->data, from ref
4 dnl #
5 AC_DEFUN([ZFS_AC_KERNEL_SRC_PERCPU_REF_COUNT_IN_DATA], [
6         ZFS_LINUX_TEST_SRC([percpu_ref_count_in_data], [
7                 #include <linux/percpu-refcount.h>
8         ],[
9                 struct percpu_ref_data d;
11                 atomic_long_set(&d.count, 1L);
12         ])
15 AC_DEFUN([ZFS_AC_KERNEL_PERCPU_REF_COUNT_IN_DATA], [
16         AC_MSG_CHECKING([whether is inside percpu_ref.data])
17         ZFS_LINUX_TEST_RESULT([percpu_ref_count_in_data], [
18                 AC_MSG_RESULT(yes)
19                 AC_DEFINE(ZFS_PERCPU_REF_COUNT_IN_DATA, 1,
20                     [count is located in percpu_ref.data])
21         ],[
22                 AC_MSG_RESULT(no)
23         ])
25 AC_DEFUN([ZFS_AC_KERNEL_SRC_PERCPU], [
26         ZFS_AC_KERNEL_SRC_PERCPU_REF_COUNT_IN_DATA
29 AC_DEFUN([ZFS_AC_KERNEL_PERCPU], [
30         ZFS_AC_KERNEL_PERCPU_REF_COUNT_IN_DATA