2 dnl # Supported mkdir() interfaces checked newest to oldest.
4 AC_DEFUN([ZFS_AC_KERNEL_SRC_MKDIR], [
7 dnl # mkdir() takes struct mnt_idmap * as the first arg
9 ZFS_LINUX_TEST_SRC([mkdir_mnt_idmap], [
12 static int mkdir(struct mnt_idmap *idmap,
13 struct inode *inode, struct dentry *dentry,
14 umode_t umode) { return 0; }
15 static const struct inode_operations
16 iops __attribute__ ((unused)) = {
23 dnl # The struct user_namespace arg was added as the first argument to
26 ZFS_LINUX_TEST_SRC([mkdir_user_namespace], [
29 static int mkdir(struct user_namespace *userns,
30 struct inode *inode, struct dentry *dentry,
31 umode_t umode) { return 0; }
33 static const struct inode_operations
34 iops __attribute__ ((unused)) = {
41 dnl # The VFS .create, .mkdir and .mknod callbacks were updated to take a
42 dnl # umode_t type rather than an int. The expectation is that any backport
43 dnl # would also change all three prototypes. However, if it turns out that
44 dnl # some distribution doesn't backport the whole thing this could be
45 dnl # broken apart into three separate checks.
47 ZFS_LINUX_TEST_SRC([inode_operations_mkdir], [
50 static int mkdir(struct inode *inode, struct dentry *dentry,
51 umode_t umode) { return 0; }
53 static const struct inode_operations
54 iops __attribute__ ((unused)) = {
60 AC_DEFUN([ZFS_AC_KERNEL_MKDIR], [
63 dnl # mkdir() takes struct mnt_idmap * as the first arg
65 AC_MSG_CHECKING([whether iops->mkdir() takes struct mnt_idmap*])
66 ZFS_LINUX_TEST_RESULT([mkdir_mnt_idmap], [
68 AC_DEFINE(HAVE_IOPS_MKDIR_IDMAP, 1,
69 [iops->mkdir() takes struct mnt_idmap*])
73 dnl # The struct user_namespace arg was added as the first argument to
74 dnl # mkdir() of the iops structure.
76 AC_MSG_CHECKING([whether iops->mkdir() takes struct user_namespace*])
77 ZFS_LINUX_TEST_RESULT([mkdir_user_namespace], [
79 AC_DEFINE(HAVE_IOPS_MKDIR_USERNS, 1,
80 [iops->mkdir() takes struct user_namespace*])
84 AC_MSG_CHECKING([whether iops->mkdir() takes umode_t])
85 ZFS_LINUX_TEST_RESULT([inode_operations_mkdir], [
87 AC_DEFINE(HAVE_MKDIR_UMODE_T, 1,
88 [iops->mkdir() takes umode_t])
90 ZFS_LINUX_TEST_ERROR([mkdir()])