]>
Commit | Line | Data |
---|---|---|
e2a82961 | 1 | AC_DEFUN([ZFS_AC_KERNEL_SRC_SYMLINK], [ |
d4dc53da YY |
2 | dnl # |
3 | dnl # 6.3 API change that changed the first arg | |
4 | dnl # to struct mnt_idmap* | |
5 | dnl # | |
6 | ZFS_LINUX_TEST_SRC([symlink_mnt_idmap], [ | |
7 | #include <linux/fs.h> | |
8 | #include <linux/sched.h> | |
a41d0b29 | 9 | static int tmp_symlink(struct mnt_idmap *idmap, |
d4dc53da YY |
10 | struct inode *inode ,struct dentry *dentry, |
11 | const char *path) { return 0; } | |
12 | ||
13 | static const struct inode_operations | |
14 | iops __attribute__ ((unused)) = { | |
15 | .symlink = tmp_symlink, | |
16 | }; | |
17 | ],[]) | |
e2a82961 CK |
18 | dnl # |
19 | dnl # 5.12 API change that added the struct user_namespace* arg | |
20 | dnl # to the front of this function type's arg list. | |
21 | dnl # | |
22 | ZFS_LINUX_TEST_SRC([symlink_userns], [ | |
23 | #include <linux/fs.h> | |
24 | #include <linux/sched.h> | |
25 | ||
a41d0b29 | 26 | static int tmp_symlink(struct user_namespace *userns, |
e2a82961 CK |
27 | struct inode *inode ,struct dentry *dentry, |
28 | const char *path) { return 0; } | |
29 | ||
30 | static const struct inode_operations | |
31 | iops __attribute__ ((unused)) = { | |
32 | .symlink = tmp_symlink, | |
33 | }; | |
34 | ],[]) | |
35 | ]) | |
36 | ||
37 | AC_DEFUN([ZFS_AC_KERNEL_SYMLINK], [ | |
d4dc53da YY |
38 | AC_MSG_CHECKING([whether iops->symlink() takes struct mnt_idmap*]) |
39 | ZFS_LINUX_TEST_RESULT([symlink_mnt_idmap], [ | |
e2a82961 | 40 | AC_MSG_RESULT(yes) |
d4dc53da YY |
41 | AC_DEFINE(HAVE_IOPS_SYMLINK_IDMAP, 1, |
42 | [iops->symlink() takes struct mnt_idmap*]) | |
e2a82961 | 43 | ],[ |
d4dc53da YY |
44 | AC_MSG_CHECKING([whether iops->symlink() takes struct user_namespace*]) |
45 | ZFS_LINUX_TEST_RESULT([symlink_userns], [ | |
46 | AC_MSG_RESULT(yes) | |
47 | AC_DEFINE(HAVE_IOPS_SYMLINK_USERNS, 1, | |
48 | [iops->symlink() takes struct user_namespace*]) | |
49 | ],[ | |
50 | AC_MSG_RESULT(no) | |
51 | ]) | |
e2a82961 CK |
52 | ]) |
53 | ]) |