]> git.proxmox.com Git - mirror_zfs.git/blame - config/kernel-inode-create.m4
Revert "Reduce dbuf_find() lock contention"
[mirror_zfs.git] / config / kernel-inode-create.m4
CommitLineData
e2a82961
CK
1AC_DEFUN([ZFS_AC_KERNEL_SRC_CREATE], [
2 dnl #
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.
5 dnl #
6 ZFS_LINUX_TEST_SRC([create_userns], [
7 #include <linux/fs.h>
8 #include <linux/sched.h>
9
10 int inode_create(struct user_namespace *userns,
11 struct inode *inode ,struct dentry *dentry,
12 umode_t umode, bool flag) { return 0; }
13
14 static const struct inode_operations
15 iops __attribute__ ((unused)) = {
16 .create = inode_create,
17 };
18 ],[])
19
20 dnl #
21 dnl # 3.6 API change
22 dnl #
066e8252
BB
23 ZFS_LINUX_TEST_SRC([create_flags], [
24 #include <linux/fs.h>
25 #include <linux/sched.h>
26
27 int inode_create(struct inode *inode ,struct dentry *dentry,
28 umode_t umode, bool flag) { return 0; }
29
30 static const struct inode_operations
31 iops __attribute__ ((unused)) = {
32 .create = inode_create,
33 };
34 ],[])
35])
36
e2a82961
CK
37AC_DEFUN([ZFS_AC_KERNEL_CREATE], [
38 AC_MSG_CHECKING([whether iops->create() takes struct user_namespace*])
39 ZFS_LINUX_TEST_RESULT([create_userns], [
066e8252 40 AC_MSG_RESULT(yes)
e2a82961
CK
41 AC_DEFINE(HAVE_IOPS_CREATE_USERNS, 1,
42 [iops->create() takes struct user_namespace*])
066e8252 43 ],[
e2a82961
CK
44 AC_MSG_RESULT(no)
45
46 AC_MSG_CHECKING([whether iops->create() passes flags])
47 ZFS_LINUX_TEST_RESULT([create_flags], [
48 AC_MSG_RESULT(yes)
49 ],[
50 ZFS_LINUX_TEST_ERROR([iops->create()])
51 ])
066e8252
BB
52 ])
53])