Whamcloud - gitweb
LU-17392 build: compatibility updates for kernel 6.7
[fs/lustre-release.git] / lustre / autoconf / lustre-core.m4
index 5912e83..5afeb19 100644 (file)
@@ -4363,6 +4363,29 @@ AC_DEFUN([LC_HAVE_INODE_GET_MTIME_SEC], [
 ]) # LC_HAVE_INODE_GET_MTIME_SEC
 
 #
+# LC_HAVE_SHRINKER_ALLOC
+#
+# Linux commit v6.6-rc4-53-gc42d50aefd17
+#   mm: shrinker: add infrastructure for dynamically allocating shrinker
+#
+AC_DEFUN([LC_SRC_HAVE_SHRINKER_ALLOC], [
+       LB2_LINUX_TEST_SRC([shrinker_alloc_exists], [
+               #include <linux/shrinker.h>
+       ],[
+               struct shrinker *shrink __attribute__ ((unused));
+
+               shrink = shrinker_alloc(0, "%s", "whoami");
+       ],[-Werror])
+])
+AC_DEFUN([LC_HAVE_SHRINKER_ALLOC], [
+       LB2_MSG_LINUX_TEST_RESULT([if 'shrinker_alloc()' exists],
+       [shrinker_alloc_exists], [
+               AC_DEFINE(HAVE_SHRINKER_ALLOC, 1,
+                       ['shrinker_alloc()' exists])
+       ])
+]) # LC_HAVE_SHRINKER_ALLOC
+
+#
 # LC_PROG_LINUX
 #
 # Lustre linux kernel checks
@@ -4644,6 +4667,7 @@ AC_DEFUN([LC_PROG_LINUX_SRC], [
 
        # 6.7
        LC_SRC_HAVE_INODE_GET_MTIME_SEC
+       LC_SRC_HAVE_SHRINKER_ALLOC
 
        # kernel patch to extend integrity interface
        LC_SRC_BIO_INTEGRITY_PREP_FN
@@ -4947,6 +4971,7 @@ AC_DEFUN([LC_PROG_LINUX_RESULTS], [
 
        # 6.7
        LC_HAVE_INODE_GET_MTIME_SEC
+       LC_HAVE_SHRINKER_ALLOC
 
        # kernel patch to extend integrity interface
        LC_BIO_INTEGRITY_PREP_FN