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*])
75 dnl # The struct user_namespace arg was added as the first argument to
76 dnl # mkdir() of the iops structure.
78 AC_MSG_CHECKING([whether iops->mkdir() takes struct user_namespace*])
79 ZFS_LINUX_TEST_RESULT([mkdir_user_namespace], [
81 AC_DEFINE(HAVE_IOPS_MKDIR_USERNS, 1,
82 [iops->mkdir() takes struct user_namespace*])