>From 75ae570ce7b0bb6b40c76beb18fc075e9af3127a Mon Sep 17 00:00:00 2001 From: Knut Petersen Date: Wed, 18 Sep 2013 12:06:33 +0200 Subject: [PATCH] mm: respect SHRINK_STOP in shrink_slab_node() Since commit 81e49f811404f428a9d9a63295a0c267e802fa12 i915_gem_inactive_count() might return SHRINK_STOP. Unfortunately SHRINK_STOP is not handled propperly in shrink_slab_node(), causing a system log cluttered with kernel error messages complaining about "negative objects to delete". I think the proper way of handling SHRINK_STOP is obvious, we should obey ;-) Signed-off-by: Knut Petersen --- mm/vmscan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/vmscan.c b/mm/vmscan.c index 8ed1b77..b1e6f0d 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -244,6 +244,8 @@ shrink_slab_node(struct shrink_control *shrinkctl, struct shrinker *shrinker, max_pass = shrinker->count_objects(shrinker, shrinkctl); if (max_pass == 0) return 0; + if (max_pass == SHRINK_STOP) + return 0; /* * copy the current shrinker scan count into a local variable -- 1.8.1.4