git: a39ed121eab1 - main - LinuxKPI: Chase for new "name" argument of register_shrinker()

From: Vladimir Kondratyev <wulf_at_FreeBSD.org>
Date: Sun, 24 Dec 2023 08:23:10 UTC
The branch main has been updated by wulf:

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

commit a39ed121eab16bd2579422f71df7ef29b55965d1
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2023-12-24 08:19:59 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2023-12-24 08:19:59 +0000

    LinuxKPI: Chase for new "name" argument of register_shrinker()
    
    Linux uses it only if SHRINKER_DEBUG config option is enabled. Ignore it.
    
    Sponsored by:   Serenity Cyber Security, LLC
    Reviewers:      manu, bz
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D42809
---
 sys/compat/linuxkpi/common/include/linux/shrinker.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/shrinker.h b/sys/compat/linuxkpi/common/include/linux/shrinker.h
index eb3093f4fb19..a865241cc7cb 100644
--- a/sys/compat/linuxkpi/common/include/linux/shrinker.h
+++ b/sys/compat/linuxkpi/common/include/linux/shrinker.h
@@ -51,7 +51,11 @@ int	linuxkpi_register_shrinker(struct shrinker *s);
 void	linuxkpi_unregister_shrinker(struct shrinker *s);
 void	linuxkpi_synchronize_shrinkers(void);
 
+#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60000
+#define	register_shrinker(s, ...)	linuxkpi_register_shrinker(s)
+#else
 #define	register_shrinker(s)	linuxkpi_register_shrinker(s)
+#endif
 #define	unregister_shrinker(s)	linuxkpi_unregister_shrinker(s)
 #define	synchronize_shrinkers()	linuxkpi_synchronize_shrinkers()