From 9f6d46ab6635fb52b9b962eab6f9c560ecaec097 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Thu, 20 Nov 2025 11:16:24 -0800 Subject: [PATCH] Remove list_lru_shrink_count() and list_lru_shrink_walk() compat for el7 Signed-off-by: Auke Kok --- kmod/src/Makefile.kernelcompat | 9 --------- kmod/src/kernelcompat.h | 15 --------------- 2 files changed, 24 deletions(-) diff --git a/kmod/src/Makefile.kernelcompat b/kmod/src/Makefile.kernelcompat index bc4e405d..2ba4c986 100644 --- a/kmod/src/Makefile.kernelcompat +++ b/kmod/src/Makefile.kernelcompat @@ -187,15 +187,6 @@ ifneq (,$(shell grep 'typedef.*__bitwise unsigned.*int vm_fault_t' include/linux ccflags-y += -DKC_MM_VM_FAULT_T endif -# -# v3.19-4742-g503c358cf192 -# -# list_lru_shrink_count() and list_lru_shrink_walk() introduced -# -ifneq (,$(shell grep 'list_lru_shrink_count.*struct list_lru' include/linux/list_lru.h)) -ccflags-y += -DKC_LIST_LRU_SHRINK_COUNT_WALK -endif - # # v3.19-4757-g3f97b163207c # diff --git a/kmod/src/kernelcompat.h b/kmod/src/kernelcompat.h index c81e79b0..55eb3d4c 100644 --- a/kmod/src/kernelcompat.h +++ b/kmod/src/kernelcompat.h @@ -196,21 +196,6 @@ static inline vm_fault_t vmf_error(int err) #include -#ifndef KC_LIST_LRU_SHRINK_COUNT_WALK -/* we don't bother with sc->{nid,memcg} (which doesn't exist in oldest kernels) */ -static inline unsigned long list_lru_shrink_count(struct list_lru *lru, - struct shrink_control *sc) -{ - return list_lru_count(lru); -} -static inline unsigned long -list_lru_shrink_walk(struct list_lru *lru, struct shrink_control *sc, - list_lru_walk_cb isolate, void *cb_arg) -{ - return list_lru_walk(lru, isolate, cb_arg, sc->nr_to_scan); -} -#endif - #ifndef KC_LIST_LRU_ADD_OBJ #define list_lru_add_obj list_lru_add #define list_lru_del_obj list_lru_del