2 dnl # Supported get_link() interfaces checked newest to oldest.
3 dnl # Note this interface used to be named follow_link.
5 AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_LINK], [
6 ZFS_LINUX_TEST_SRC([inode_operations_get_link], [
8 const char *get_link(struct dentry *de, struct inode *ip,
9 struct delayed_call *done) { return "symlink"; }
10 static struct inode_operations
11 iops __attribute__ ((unused)) = {
16 ZFS_LINUX_TEST_SRC([inode_operations_get_link_cookie], [
18 const char *get_link(struct dentry *de, struct
19 inode *ip, void **cookie) { return "symlink"; }
20 static struct inode_operations
21 iops __attribute__ ((unused)) = {
26 ZFS_LINUX_TEST_SRC([inode_operations_follow_link], [
28 const char *follow_link(struct dentry *de,
29 void **cookie) { return "symlink"; }
30 static struct inode_operations
31 iops __attribute__ ((unused)) = {
32 .follow_link = follow_link,
36 ZFS_LINUX_TEST_SRC([inode_operations_follow_link_nameidata], [
38 void *follow_link(struct dentry *de, struct
39 nameidata *nd) { return (void *)NULL; }
40 static struct inode_operations
41 iops __attribute__ ((unused)) = {
42 .follow_link = follow_link,
47 AC_DEFUN([ZFS_AC_KERNEL_GET_LINK], [
50 dnl # The get_link interface has added a delayed done call and
51 dnl # used it to retire the put_link() interface.
53 AC_MSG_CHECKING([whether iops->get_link() passes delayed])
54 ZFS_LINUX_TEST_RESULT([inode_operations_get_link], [
56 AC_DEFINE(HAVE_GET_LINK_DELAYED, 1, [iops->get_link() delayed])
62 dnl # The follow_link() interface has been replaced by
63 dnl # get_link() which behaves the same as before except:
64 dnl # - An inode is passed as a separate argument
65 dnl # - When called in RCU mode a NULL dentry is passed.
67 AC_MSG_CHECKING([whether iops->get_link() passes cookie])
68 ZFS_LINUX_TEST_RESULT([inode_operations_get_link_cookie], [
70 AC_DEFINE(HAVE_GET_LINK_COOKIE, 1,
71 [iops->get_link() cookie])
77 dnl # This kernel retired the nameidata structure.
80 [whether iops->follow_link() passes cookie])
81 ZFS_LINUX_TEST_RESULT([inode_operations_follow_link], [
83 AC_DEFINE(HAVE_FOLLOW_LINK_COOKIE, 1,
84 [iops->follow_link() cookie])
92 [whether iops->follow_link() passes nameidata])
93 ZFS_LINUX_TEST_RESULT(
94 [inode_operations_follow_link_nameidata],[
96 AC_DEFINE(HAVE_FOLLOW_LINK_NAMEIDATA, 1,
97 [iops->follow_link() nameidata])
99 ZFS_LINUX_TEST_ERROR([get_link])