aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2013-08-04 19:13:15 -0400
committerBrian Behlendorf <[email protected]>2013-08-08 09:20:56 -0700
commitc11a12bc3b2e5ee9a6bd74e26f1a396b6025fbd4 (patch)
treea6745879aa9f524a8f1c09bef81d8bf07fa7491a /module/zfs
parent8170d281263e52ff33d7fba93ab625196844df36 (diff)
Return -1 from arc_shrinker_func()
This is analogous to SPL commit zfsonlinux/spl@b9b3715. While we don't have clear evidence of systems getting caught here indefinately like in the SPL this ensures that it will never happen. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #1579
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/arc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index 89f5fe5f0..62f167e1d 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -2374,10 +2374,8 @@ __arc_shrinker_func(struct shrinker *shrink, struct shrink_control *sc)
*/
if (pages > 0) {
arc_kmem_reap_now(ARC_RECLAIM_AGGR, ptob(sc->nr_to_scan));
- pages = btop(arc_evictable_memory());
} else {
arc_kmem_reap_now(ARC_RECLAIM_CONS, ptob(sc->nr_to_scan));
- pages = -1;
}
/*
@@ -2397,7 +2395,7 @@ __arc_shrinker_func(struct shrinker *shrink, struct shrink_control *sc)
mutex_exit(&arc_reclaim_thr_lock);
- return (pages);
+ return (-1);
}
SPL_SHRINKER_CALLBACK_WRAPPER(arc_shrinker_func);