From 65bfdc746d86e6d649005c6227142975b78f9b52 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 22 Dec 2013 10:15:08 +0000 Subject: [PATCH] scst_mem: Build fix for kernel versions before 2.6.35 (see also r5163) git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5174 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_mem.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scst/src/scst_mem.c b/scst/src/scst_mem.c index 3b5dba47b..032503f35 100644 --- a/scst/src/scst_mem.c +++ b/scst/src/scst_mem.c @@ -351,8 +351,7 @@ out_unlock_put: goto out; } -unsigned long sgv_can_be_shrinked(struct shrinker *shrinker, - struct shrink_control *sc) +unsigned long __sgv_can_be_shrinked(void) { unsigned long res; struct sgv_pool *pool; @@ -376,6 +375,12 @@ unsigned long sgv_can_be_shrinked(struct shrinker *shrinker, } #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) +unsigned long sgv_can_be_shrinked(struct shrinker *shrinker, + struct shrink_control *sc) +{ + return __sgv_can_be_shrinked(); +} + unsigned long sgv_scan_shrink(struct shrinker *shrinker, struct shrink_control *sc) { @@ -409,7 +414,7 @@ static int sgv_shrink(struct shrinker *shrinker, struct shrink_control *sc) nr = __sgv_shrink(nr, SGV_MIN_SHRINK_INTERVAL, &freed); TRACE_MEM("Left %d", nr); } else - nr = sgv_can_be_shrinked(shrinker, sc); + nr = __sgv_can_be_shrinked(); TRACE_EXIT_RES(nr); return nr;