config: remove HAVE_D_PRUNE_ALIASES

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #16479
This commit is contained in:
Rob Norris 2024-08-03 13:07:13 +10:00 committed by Brian Behlendorf
parent dc6af4a4b5
commit 8e002ee26e
2 changed files with 1 additions and 31 deletions

View File

@ -20,31 +20,6 @@ AC_DEFUN([ZFS_AC_KERNEL_D_OBTAIN_ALIAS], [
])
])
dnl #
dnl # 2.6.12 API change
dnl # d_prune_aliases() helper function available.
dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_D_PRUNE_ALIASES], [
ZFS_LINUX_TEST_SRC([d_prune_aliases], [
#include <linux/dcache.h>
], [
struct inode *ip = NULL;
d_prune_aliases(ip);
])
])
AC_DEFUN([ZFS_AC_KERNEL_D_PRUNE_ALIASES], [
AC_MSG_CHECKING([whether d_prune_aliases() is available])
ZFS_LINUX_TEST_RESULT_SYMBOL([d_prune_aliases],
[d_prune_aliases], [fs/dcache.c], [
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_D_PRUNE_ALIASES, 1,
[d_prune_aliases() is available])
], [
ZFS_LINUX_TEST_ERROR([d_prune_aliases()])
])
])
dnl #
dnl # 2.6.38 API change
dnl # Added d_set_d_op() helper function.
@ -120,7 +95,6 @@ AC_DEFUN([ZFS_AC_KERNEL_S_D_OP], [
AC_DEFUN([ZFS_AC_KERNEL_SRC_DENTRY], [
ZFS_AC_KERNEL_SRC_D_OBTAIN_ALIAS
ZFS_AC_KERNEL_SRC_D_PRUNE_ALIASES
ZFS_AC_KERNEL_SRC_D_SET_D_OP
ZFS_AC_KERNEL_SRC_D_REVALIDATE_NAMEIDATA
ZFS_AC_KERNEL_SRC_S_D_OP
@ -128,7 +102,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_DENTRY], [
AC_DEFUN([ZFS_AC_KERNEL_DENTRY], [
ZFS_AC_KERNEL_D_OBTAIN_ALIAS
ZFS_AC_KERNEL_D_PRUNE_ALIASES
ZFS_AC_KERNEL_D_SET_D_OP
ZFS_AC_KERNEL_D_REVALIDATE_NAMEIDATA
ZFS_AC_KERNEL_S_D_OP

View File

@ -1290,14 +1290,11 @@ zfs_prune(struct super_block *sb, unsigned long nr_to_scan, int *objects)
*objects = (*shrinker->scan_objects)(shrinker, &sc);
#elif defined(HAVE_SINGLE_SHRINKER_CALLBACK)
*objects = (*shrinker->shrink)(shrinker, &sc);
#elif defined(HAVE_D_PRUNE_ALIASES)
#define D_PRUNE_ALIASES_IS_DEFAULT
*objects = zfs_prune_aliases(zfsvfs, nr_to_scan);
#else
#error "No available dentry and inode cache pruning mechanism."
#endif
#if defined(HAVE_D_PRUNE_ALIASES) && !defined(D_PRUNE_ALIASES_IS_DEFAULT)
#ifndef D_PRUNE_ALIASES_IS_DEFAULT
#undef D_PRUNE_ALIASES_IS_DEFAULT
/*
* Fall back to zfs_prune_aliases if the kernel's per-superblock