config: remove ZFS_GLOBAL_ZONE_PAGE_STATE

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-24 21:17:57 +10:00 committed by Brian Behlendorf
parent 0a00804585
commit 8d9cb04ea8
3 changed files with 0 additions and 55 deletions

View File

@ -1,28 +1,3 @@
dnl #
dnl # 4.14 API change
dnl #
dnl # c41f012ade0b mm: rename global_page_state to global_zone_page_state
dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_GLOBAL_ZONE_PAGE_STATE], [
ZFS_LINUX_TEST_SRC([global_zone_page_state], [
#include <linux/mm.h>
#include <linux/vmstat.h>
],[
(void) global_zone_page_state(0);
])
])
AC_DEFUN([ZFS_AC_KERNEL_GLOBAL_ZONE_PAGE_STATE], [
AC_MSG_CHECKING([whether global_zone_page_state() exists])
ZFS_LINUX_TEST_RESULT([global_zone_page_state], [
AC_MSG_RESULT(yes)
AC_DEFINE(ZFS_GLOBAL_ZONE_PAGE_STATE, 1,
[global_zone_page_state() exists])
],[
AC_MSG_RESULT(no)
])
])
dnl #
dnl # Create a define and autoconf variable for an enum member
dnl #
@ -72,16 +47,10 @@ AC_DEFUN([ZFS_AC_KERNEL_GLOBAL_ZONE_PAGE_STATE_SANITY], [
AC_MSG_RESULT(yes)
])
AC_DEFUN([ZFS_AC_KERNEL_SRC_GLOBAL_PAGE_STATE], [
ZFS_AC_KERNEL_SRC_GLOBAL_ZONE_PAGE_STATE
])
dnl #
dnl # enum members in which we're interested
dnl #
AC_DEFUN([ZFS_AC_KERNEL_GLOBAL_PAGE_STATE], [
ZFS_AC_KERNEL_GLOBAL_ZONE_PAGE_STATE
ZFS_AC_KERNEL_ENUM_MEMBER([NR_FILE_PAGES],
[node_stat_item], [$LINUX/include/linux/mmzone.h])
ZFS_AC_KERNEL_ENUM_MEMBER([NR_INACTIVE_ANON],

View File

@ -38,7 +38,6 @@ dnl #
AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
ZFS_AC_KERNEL_SRC_TYPES
ZFS_AC_KERNEL_SRC_OBJTOOL
ZFS_AC_KERNEL_SRC_GLOBAL_PAGE_STATE
ZFS_AC_KERNEL_SRC_ACCESS_OK_TYPE
ZFS_AC_KERNEL_SRC_PDE_DATA
ZFS_AC_KERNEL_SRC_GENERIC_FADVISE

View File

@ -17,9 +17,7 @@
/*
* Create our own accessor functions to follow the Linux API changes
*/
#if defined(ZFS_GLOBAL_ZONE_PAGE_STATE)
/* global_zone_page_state() introduced */
#if defined(ZFS_ENUM_NODE_STAT_ITEM_NR_FILE_PAGES)
#define nr_file_pages() global_node_page_state(NR_FILE_PAGES)
#else
@ -36,25 +34,4 @@
#define nr_inactive_file_pages() global_zone_page_state(NR_INACTIVE_FILE)
#endif
#else
/* global_node_page_state() introduced */
#if defined(ZFS_ENUM_NODE_STAT_ITEM_NR_FILE_PAGES)
#define nr_file_pages() global_node_page_state(NR_FILE_PAGES)
#else
#define nr_file_pages() global_page_state(NR_FILE_PAGES)
#endif
#if defined(ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_ANON)
#define nr_inactive_anon_pages() global_node_page_state(NR_INACTIVE_ANON)
#else
#define nr_inactive_anon_pages() global_page_state(NR_INACTIVE_ANON)
#endif
#if defined(ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_FILE)
#define nr_inactive_file_pages() global_node_page_state(NR_INACTIVE_FILE)
#else
#define nr_inactive_file_pages() global_page_state(NR_INACTIVE_FILE)
#endif
#endif /* ZFS_GLOBAL_ZONE_PAGE_STATE */
#endif /* _ZFS_PAGE_COMPAT_H */