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
This commit is contained in:
Bart Van Assche
2013-12-22 10:15:08 +00:00
parent cd16bfdf42
commit 65bfdc746d
+8 -3
View File
@@ -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;