diff --git a/config/kernel-dentry-operations.m4 b/config/kernel-dentry-operations.m4 index 183979a437..4a112cf342 100644 --- a/config/kernel-dentry-operations.m4 +++ b/config/kernel-dentry-operations.m4 @@ -1,28 +1,3 @@ -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 - ], [ - 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 # 3.6 API change dnl # @@ -53,11 +28,9 @@ AC_DEFUN([ZFS_AC_KERNEL_D_REVALIDATE_NAMEIDATA], [ ]) AC_DEFUN([ZFS_AC_KERNEL_SRC_DENTRY], [ - ZFS_AC_KERNEL_SRC_D_PRUNE_ALIASES ZFS_AC_KERNEL_SRC_D_REVALIDATE_NAMEIDATA ]) AC_DEFUN([ZFS_AC_KERNEL_DENTRY], [ - ZFS_AC_KERNEL_D_PRUNE_ALIASES ZFS_AC_KERNEL_D_REVALIDATE_NAMEIDATA ]) diff --git a/module/os/linux/zfs/zfs_vfsops.c b/module/os/linux/zfs/zfs_vfsops.c index a52f08868d..1eb86f51d0 100644 --- a/module/os/linux/zfs/zfs_vfsops.c +++ b/module/os/linux/zfs/zfs_vfsops.c @@ -1289,14 +1289,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