diff options
Diffstat (limited to 'config/kernel-symlink.m4')
-rw-r--r-- | config/kernel-symlink.m4 | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/config/kernel-symlink.m4 b/config/kernel-symlink.m4 index d90366d04b72..804fceab28f0 100644 --- a/config/kernel-symlink.m4 +++ b/config/kernel-symlink.m4 @@ -1,5 +1,21 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SYMLINK], [ dnl # + dnl # 6.3 API change that changed the first arg + dnl # to struct mnt_idmap* + dnl # + ZFS_LINUX_TEST_SRC([symlink_mnt_idmap], [ + #include <linux/fs.h> + #include <linux/sched.h> + static int tmp_symlink(struct mnt_idmap *idmap, + struct inode *inode ,struct dentry *dentry, + const char *path) { return 0; } + + static const struct inode_operations + iops __attribute__ ((unused)) = { + .symlink = tmp_symlink, + }; + ],[]) + dnl # dnl # 5.12 API change that added the struct user_namespace* arg dnl # to the front of this function type's arg list. dnl # @@ -7,7 +23,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SYMLINK], [ #include <linux/fs.h> #include <linux/sched.h> - int tmp_symlink(struct user_namespace *userns, + static int tmp_symlink(struct user_namespace *userns, struct inode *inode ,struct dentry *dentry, const char *path) { return 0; } @@ -19,12 +35,19 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SYMLINK], [ ]) AC_DEFUN([ZFS_AC_KERNEL_SYMLINK], [ - AC_MSG_CHECKING([whether iops->symlink() takes struct user_namespace*]) - ZFS_LINUX_TEST_RESULT([symlink_userns], [ + AC_MSG_CHECKING([whether iops->symlink() takes struct mnt_idmap*]) + ZFS_LINUX_TEST_RESULT([symlink_mnt_idmap], [ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IOPS_SYMLINK_USERNS, 1, - [iops->symlink() takes struct user_namespace*]) + AC_DEFINE(HAVE_IOPS_SYMLINK_IDMAP, 1, + [iops->symlink() takes struct mnt_idmap*]) ],[ - AC_MSG_RESULT(no) + AC_MSG_CHECKING([whether iops->symlink() takes struct user_namespace*]) + ZFS_LINUX_TEST_RESULT([symlink_userns], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_IOPS_SYMLINK_USERNS, 1, + [iops->symlink() takes struct user_namespace*]) + ],[ + AC_MSG_RESULT(no) + ]) ]) ]) |