diff --git a/config/kernel-get-link.m4 b/config/kernel-get-link.m4 index 1f8f5b0c8..31c7ac623 100644 --- a/config/kernel-get-link.m4 +++ b/config/kernel-get-link.m4 @@ -32,16 +32,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_LINK], [ .follow_link = follow_link, }; ],[]) - - ZFS_LINUX_TEST_SRC([inode_operations_follow_link_nameidata], [ - #include - static void *follow_link(struct dentry *de, struct - nameidata *nd) { return (void *)NULL; } - static struct inode_operations - iops __attribute__ ((unused)) = { - .follow_link = follow_link, - }; - ],[]) ]) AC_DEFUN([ZFS_AC_KERNEL_GET_LINK], [ @@ -84,20 +74,7 @@ AC_DEFUN([ZFS_AC_KERNEL_GET_LINK], [ [iops->follow_link() cookie]) ],[ AC_MSG_RESULT(no) - - dnl # - dnl # 2.6.32 API - dnl # - AC_MSG_CHECKING( - [whether iops->follow_link() passes nameidata]) - ZFS_LINUX_TEST_RESULT( - [inode_operations_follow_link_nameidata],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FOLLOW_LINK_NAMEIDATA, 1, - [iops->follow_link() nameidata]) - ],[ - ZFS_LINUX_TEST_ERROR([get_link]) - ]) + ZFS_LINUX_TEST_ERROR([get_link]) ]) ]) ]) diff --git a/module/os/linux/zfs/zpl_inode.c b/module/os/linux/zfs/zpl_inode.c index 059f74786..1b7d06217 100644 --- a/module/os/linux/zfs/zpl_inode.c +++ b/module/os/linux/zfs/zpl_inode.c @@ -748,21 +748,6 @@ zpl_follow_link(struct dentry *dentry, void **cookie) return (*cookie = link); } -#elif defined(HAVE_FOLLOW_LINK_NAMEIDATA) -static void * -zpl_follow_link(struct dentry *dentry, struct nameidata *nd) -{ - char *link = NULL; - int error; - - error = zpl_get_link_common(dentry, dentry->d_inode, &link); - if (error) - nd_set_link(nd, ERR_PTR(error)); - else - nd_set_link(nd, link); - - return (NULL); -} #endif static int @@ -870,7 +855,7 @@ const struct inode_operations zpl_symlink_inode_operations = { #endif #if defined(HAVE_GET_LINK_DELAYED) || defined(HAVE_GET_LINK_COOKIE) .get_link = zpl_get_link, -#elif defined(HAVE_FOLLOW_LINK_COOKIE) || defined(HAVE_FOLLOW_LINK_NAMEIDATA) +#elif defined(HAVE_FOLLOW_LINK_COOKIE) .follow_link = zpl_follow_link, #endif #if defined(HAVE_PUT_LINK_COOKIE) || defined(HAVE_PUT_LINK_NAMEIDATA)