aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomohiro Kusumi <[email protected]>2019-05-26 05:40:46 +0900
committerBrian Behlendorf <[email protected]>2019-05-25 13:40:46 -0700
commit36c110f9943f3abe2ac59ffa7e76b48e8dbfc1b6 (patch)
tree59f50dc6c18c12e8789e15f9a7de30050ab213bd
parent4bb17ebfe20754078d15e14a3231e25be1d5ca9f (diff)
Linux 5.2 compat: Fix config/kernel-shrink.m4 test failure
"whether ->count_objects callback exists" test failed with "error: error" message for using an incomplete function shrinker_cb(). This is caused by torvalds/linux@83da1bed86. It's configurable, but we would want to be able to compile with default kbuild setting. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: loli10K <[email protected]> Signed-off-by: Tomohiro Kusumi <[email protected]> Closes #8776
-rw-r--r--config/kernel-shrink.m422
1 files changed, 15 insertions, 7 deletions
diff --git a/config/kernel-shrink.m4 b/config/kernel-shrink.m4
index 37da0ec72..405cbf42c 100644
--- a/config/kernel-shrink.m4
+++ b/config/kernel-shrink.m4
@@ -144,7 +144,9 @@ AC_DEFUN([ZFS_AC_KERNEL_SHRINKER_CALLBACK],[
ZFS_LINUX_TRY_COMPILE([
#include <linux/mm.h>
- int shrinker_cb(int nr_to_scan, gfp_t gfp_mask);
+ int shrinker_cb(int nr_to_scan, gfp_t gfp_mask) {
+ return 0;
+ }
],[
struct shrinker cache_shrinker = {
.shrink = shrinker_cb,
@@ -166,8 +168,10 @@ AC_DEFUN([ZFS_AC_KERNEL_SHRINKER_CALLBACK],[
ZFS_LINUX_TRY_COMPILE([
#include <linux/mm.h>
- int shrinker_cb(struct shrinker *, int nr_to_scan,
- gfp_t gfp_mask);
+ int shrinker_cb(struct shrinker *shrink, int nr_to_scan,
+ gfp_t gfp_mask) {
+ return 0;
+ }
],[
struct shrinker cache_shrinker = {
.shrink = shrinker_cb,
@@ -190,8 +194,10 @@ AC_DEFUN([ZFS_AC_KERNEL_SHRINKER_CALLBACK],[
ZFS_LINUX_TRY_COMPILE([
#include <linux/mm.h>
- int shrinker_cb(struct shrinker *,
- struct shrink_control *sc);
+ int shrinker_cb(struct shrinker *shrink,
+ struct shrink_control *sc) {
+ return 0;
+ }
],[
struct shrinker cache_shrinker = {
.shrink = shrinker_cb,
@@ -215,8 +221,10 @@ AC_DEFUN([ZFS_AC_KERNEL_SHRINKER_CALLBACK],[
#include <linux/mm.h>
unsigned long shrinker_cb(
- struct shrinker *,
- struct shrink_control *sc);
+ struct shrinker *shrink,
+ struct shrink_control *sc) {
+ return 0;
+ }
],[
struct shrinker cache_shrinker = {
.count_objects = shrinker_cb,