2016-01-14 21:25:10 +03:00
|
|
|
dnl #
|
|
|
|
dnl # Supported get_link() interfaces checked newest to oldest.
|
2019-10-01 22:50:34 +03:00
|
|
|
dnl # Note this interface used to be named follow_link.
|
2016-01-14 21:25:10 +03:00
|
|
|
dnl #
|
2019-10-01 22:50:34 +03:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_LINK], [
|
|
|
|
ZFS_LINUX_TEST_SRC([inode_operations_get_link], [
|
|
|
|
#include <linux/fs.h>
|
2024-01-23 02:50:53 +03:00
|
|
|
static const char *get_link(struct dentry *de, struct inode *ip,
|
2019-10-01 22:50:34 +03:00
|
|
|
struct delayed_call *done) { return "symlink"; }
|
|
|
|
static struct inode_operations
|
|
|
|
iops __attribute__ ((unused)) = {
|
|
|
|
.get_link = get_link,
|
|
|
|
};
|
|
|
|
],[])
|
|
|
|
|
|
|
|
ZFS_LINUX_TEST_SRC([inode_operations_follow_link], [
|
2016-01-14 21:25:10 +03:00
|
|
|
#include <linux/fs.h>
|
2024-01-23 02:50:53 +03:00
|
|
|
static const char *follow_link(struct dentry *de,
|
2016-01-14 21:25:10 +03:00
|
|
|
void **cookie) { return "symlink"; }
|
|
|
|
static struct inode_operations
|
|
|
|
iops __attribute__ ((unused)) = {
|
|
|
|
.follow_link = follow_link,
|
|
|
|
};
|
2019-10-01 22:50:34 +03:00
|
|
|
],[])
|
2016-01-14 21:25:10 +03:00
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_GET_LINK], [
|
|
|
|
dnl #
|
|
|
|
dnl # 4.5 API change
|
|
|
|
dnl # The get_link interface has added a delayed done call and
|
|
|
|
dnl # used it to retire the put_link() interface.
|
|
|
|
dnl #
|
|
|
|
AC_MSG_CHECKING([whether iops->get_link() passes delayed])
|
2019-10-01 22:50:34 +03:00
|
|
|
ZFS_LINUX_TEST_RESULT([inode_operations_get_link], [
|
2016-01-14 21:25:10 +03:00
|
|
|
AC_MSG_RESULT(yes)
|
2019-10-01 22:50:34 +03:00
|
|
|
AC_DEFINE(HAVE_GET_LINK_DELAYED, 1, [iops->get_link() delayed])
|
2016-01-14 21:25:10 +03:00
|
|
|
],[
|
2019-10-01 22:50:34 +03:00
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
|
2016-01-14 21:25:10 +03:00
|
|
|
dnl #
|
2024-08-05 15:19:15 +03:00
|
|
|
dnl # 4.2 API change
|
|
|
|
dnl # This kernel retired the nameidata structure.
|
2016-01-14 21:25:10 +03:00
|
|
|
dnl #
|
2024-08-05 15:19:15 +03:00
|
|
|
AC_MSG_CHECKING(
|
|
|
|
[whether iops->follow_link() passes cookie])
|
|
|
|
ZFS_LINUX_TEST_RESULT([inode_operations_follow_link], [
|
2016-01-14 21:25:10 +03:00
|
|
|
AC_MSG_RESULT(yes)
|
2024-08-05 15:19:15 +03:00
|
|
|
AC_DEFINE(HAVE_FOLLOW_LINK_COOKIE, 1,
|
|
|
|
[iops->follow_link() cookie])
|
2016-01-14 21:25:10 +03:00
|
|
|
],[
|
2019-10-01 22:50:34 +03:00
|
|
|
AC_MSG_RESULT(no)
|
2024-08-05 15:19:15 +03:00
|
|
|
ZFS_LINUX_TEST_ERROR([get_link])
|
2016-01-14 21:25:10 +03:00
|
|
|
])
|
|
|
|
])
|
|
|
|
])
|