1 AC_DEFUN([ZFS_AC_KERNEL_SRC_CREATE], [
3 dnl # 5.12 API change that added the struct user_namespace* arg
4 dnl # to the front of this function type's arg list.
6 ZFS_LINUX_TEST_SRC([create_userns], [
8 #include <linux/sched.h>
10 int inode_create(struct user_namespace *userns,
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,
23 ZFS_LINUX_TEST_SRC([create_flags], [
25 #include <linux/sched.h>
27 int inode_create(struct inode *inode ,struct dentry *dentry,
28 umode_t umode, bool flag) { return 0; }
30 static const struct inode_operations
31 iops __attribute__ ((unused)) = {
32 .create = inode_create,
37 AC_DEFUN([ZFS_AC_KERNEL_CREATE], [
38 AC_MSG_CHECKING([whether iops->create() takes struct user_namespace*])
39 ZFS_LINUX_TEST_RESULT([create_userns], [
41 AC_DEFINE(HAVE_IOPS_CREATE_USERNS, 1,
42 [iops->create() takes struct user_namespace*])
46 AC_MSG_CHECKING([whether iops->create() passes flags])
47 ZFS_LINUX_TEST_RESULT([create_flags], [
50 ZFS_LINUX_TEST_ERROR([iops->create()])