1 AC_DEFUN([ZFS_AC_KERNEL_SRC_PERMISSION], [
4 dnl # iops->permission() now takes struct mnt_idmap*
7 ZFS_LINUX_TEST_SRC([permission_mnt_idmap], [
9 #include <linux/sched.h>
11 static int test_permission(struct mnt_idmap *idmap,
12 struct inode *inode, int mask) { return 0; }
14 static const struct inode_operations
15 iops __attribute__ ((unused)) = {
16 .permission = test_permission,
21 dnl # 5.12 API change that added the struct user_namespace* arg
22 dnl # to the front of this function type's arg list.
24 ZFS_LINUX_TEST_SRC([permission_userns], [
26 #include <linux/sched.h>
28 static int test_permission(struct user_namespace *userns,
29 struct inode *inode, int mask) { return 0; }
31 static const struct inode_operations
32 iops __attribute__ ((unused)) = {
33 .permission = test_permission,
38 AC_DEFUN([ZFS_AC_KERNEL_PERMISSION], [
39 AC_MSG_CHECKING([whether iops->permission() takes struct mnt_idmap*])
40 ZFS_LINUX_TEST_RESULT([permission_mnt_idmap], [
42 AC_DEFINE(HAVE_IOPS_PERMISSION_IDMAP, 1,
43 [iops->permission() takes struct mnt_idmap*])
45 AC_MSG_CHECKING([whether iops->permission() takes struct user_namespace*])
46 ZFS_LINUX_TEST_RESULT([permission_userns], [
48 AC_DEFINE(HAVE_IOPS_PERMISSION_USERNS, 1,
49 [iops->permission() takes struct user_namespace*])