2 dnl # Supported mkdir() interfaces checked newest to oldest.
4 AC_DEFUN([ZFS_AC_KERNEL_SRC_MKDIR], [
7 dnl # The struct user_namespace arg was added as the first argument to
10 ZFS_LINUX_TEST_SRC([mkdir_user_namespace], [
13 int mkdir(struct user_namespace *userns,
14 struct inode *inode, struct dentry *dentry,
15 umode_t umode) { return 0; }
17 static const struct inode_operations
18 iops __attribute__ ((unused)) = {
25 dnl # The VFS .create, .mkdir and .mknod callbacks were updated to take a
26 dnl # umode_t type rather than an int. The expectation is that any backport
27 dnl # would also change all three prototypes. However, if it turns out that
28 dnl # some distribution doesn't backport the whole thing this could be
29 dnl # broken apart into three separate checks.
31 ZFS_LINUX_TEST_SRC([inode_operations_mkdir], [
34 int mkdir(struct inode *inode, struct dentry *dentry,
35 umode_t umode) { return 0; }
37 static const struct inode_operations
38 iops __attribute__ ((unused)) = {
44 AC_DEFUN([ZFS_AC_KERNEL_MKDIR], [
47 dnl # The struct user_namespace arg was added as the first argument to
48 dnl # mkdir() of the iops structure.
50 AC_MSG_CHECKING([whether iops->mkdir() takes struct user_namespace*])
51 ZFS_LINUX_TEST_RESULT([mkdir_user_namespace], [
53 AC_DEFINE(HAVE_IOPS_MKDIR_USERNS, 1,
54 [iops->mkdir() takes struct user_namespace*])
56 AC_MSG_CHECKING([whether iops->mkdir() takes umode_t])
57 ZFS_LINUX_TEST_RESULT([inode_operations_mkdir], [
59 AC_DEFINE(HAVE_MKDIR_UMODE_T, 1,
60 [iops->mkdir() takes umode_t])
62 ZFS_LINUX_TEST_ERROR([mkdir()])