From 8d9cb04ea8a1ca408befd0708691e1631d9f3129 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sat, 24 Aug 2024 21:17:57 +1000 Subject: [PATCH] config: remove ZFS_GLOBAL_ZONE_PAGE_STATE Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf Reviewed-by: Tony Hutter Reviewed-by: Tino Reichardt Signed-off-by: Rob Norris Closes #16479 --- config/kernel-global_page_state.m4 | 31 --------------------- config/kernel.m4 | 1 - include/os/linux/kernel/linux/page_compat.h | 23 --------------- 3 files changed, 55 deletions(-) diff --git a/config/kernel-global_page_state.m4 b/config/kernel-global_page_state.m4 index 114f3c8dc..fd256cc24 100644 --- a/config/kernel-global_page_state.m4 +++ b/config/kernel-global_page_state.m4 @@ -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 - #include - ],[ - (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], diff --git a/config/kernel.m4 b/config/kernel.m4 index fe4f406ea..81868924f 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -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 diff --git a/include/os/linux/kernel/linux/page_compat.h b/include/os/linux/kernel/linux/page_compat.h index 040c9b6a9..45e4fbe74 100644 --- a/include/os/linux/kernel/linux/page_compat.h +++ b/include/os/linux/kernel/linux/page_compat.h @@ -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 */