git: 35b7625ed026 - main - linuxkpi: Add stub kmem_cache_shrink

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Thu, 18 Aug 2022 09:10:09 UTC
The branch main has been updated by manu:

URL: https://cgit.FreeBSD.org/src/commit/?id=35b7625ed026d8afaf3e8e27bc9d1067d38dbde6

commit 35b7625ed026d8afaf3e8e27bc9d1067d38dbde6
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2022-08-09 12:50:04 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2022-08-18 07:46:47 +0000

    linuxkpi: Add stub kmem_cache_shrink
    
    Needed by drm-kmod.
    
    Reviewed by:    bz
    Sponsored by:   Beckhoff Automation GmbH & Co. KG
    Differential Revision:  https://reviews.freebsd.org/D36108
---
 sys/compat/linuxkpi/common/include/linux/slab.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/slab.h b/sys/compat/linuxkpi/common/include/linux/slab.h
index 1228c4d07aa6..16b5afcea693 100644
--- a/sys/compat/linuxkpi/common/include/linux/slab.h
+++ b/sys/compat/linuxkpi/common/include/linux/slab.h
@@ -67,6 +67,7 @@ MALLOC_DECLARE(M_KMALLOC);
 #define	kmem_cache_zalloc(...)	lkpi_kmem_cache_zalloc(__VA_ARGS__)
 #define	kmem_cache_free(...)	lkpi_kmem_cache_free(__VA_ARGS__)
 #define	kmem_cache_destroy(...) linux_kmem_cache_destroy(__VA_ARGS__)
+#define	kmem_cache_shrink(x)	(0)
 
 #define	KMEM_CACHE(__struct, flags)					\
 	linux_kmem_cache_create(#__struct, sizeof(struct __struct),	\