1 AC_DEFUN([ZFS_AC_KERNEL_SRC_CREATE], [
4 dnl # The first arg is changed to struct mnt_idmap *
6 ZFS_LINUX_TEST_SRC([create_mnt_idmap], [
8 #include <linux/sched.h>
10 static int inode_create(struct mnt_idmap *idmap,
11 struct inode *inode ,struct dentry *dentry,
12 umode_t umode, bool flag) { return 0; }
14 static const struct inode_operations
15 iops __attribute__ ((unused)) = {
16 .create = inode_create,
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([create_userns], [
26 #include <linux/sched.h>
28 static int inode_create(struct user_namespace *userns,
29 struct inode *inode ,struct dentry *dentry,
30 umode_t umode, bool flag) { return 0; }
32 static const struct inode_operations
33 iops __attribute__ ((unused)) = {
34 .create = inode_create,
41 ZFS_LINUX_TEST_SRC([create_flags], [
43 #include <linux/sched.h>
45 static int inode_create(struct inode *inode ,struct dentry *dentry,
46 umode_t umode, bool flag) { return 0; }
48 static const struct inode_operations
49 iops __attribute__ ((unused)) = {
50 .create = inode_create,
55 AC_DEFUN([ZFS_AC_KERNEL_CREATE], [
56 AC_MSG_CHECKING([whether iops->create() takes struct mnt_idmap*])
57 ZFS_LINUX_TEST_RESULT([create_mnt_idmap], [
59 AC_DEFINE(HAVE_IOPS_CREATE_IDMAP, 1,
60 [iops->create() takes struct mnt_idmap*])
64 AC_MSG_CHECKING([whether iops->create() takes struct user_namespace*])
65 ZFS_LINUX_TEST_RESULT([create_userns], [
67 AC_DEFINE(HAVE_IOPS_CREATE_USERNS, 1,
68 [iops->create() takes struct user_namespace*])
72 AC_MSG_CHECKING([whether iops->create() passes flags])
73 ZFS_LINUX_TEST_RESULT([create_flags], [
76 ZFS_LINUX_TEST_ERROR([iops->create()])