aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/slub.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c
index d97b692165d2..7fa27aee9b6e 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3379,6 +3379,7 @@ int __kmem_cache_shrink(struct kmem_cache *s)
3379 struct list_head discard; 3379 struct list_head discard;
3380 struct list_head promote[SHRINK_PROMOTE_MAX]; 3380 struct list_head promote[SHRINK_PROMOTE_MAX];
3381 unsigned long flags; 3381 unsigned long flags;
3382 int ret = 0;
3382 3383
3383 flush_all(s); 3384 flush_all(s);
3384 for_each_kmem_cache_node(s, node, n) { 3385 for_each_kmem_cache_node(s, node, n) {
@@ -3425,9 +3426,12 @@ int __kmem_cache_shrink(struct kmem_cache *s)
3425 /* Release empty slabs */ 3426 /* Release empty slabs */
3426 list_for_each_entry_safe(page, t, &discard, lru) 3427 list_for_each_entry_safe(page, t, &discard, lru)
3427 discard_slab(s, page); 3428 discard_slab(s, page);
3429
3430 if (slabs_node(s, node))
3431 ret = 1;
3428 } 3432 }
3429 3433
3430 return 0; 3434 return ret;
3431} 3435}
3432 3436
3433static int slab_mem_going_offline_callback(void *arg) 3437static int slab_mem_going_offline_callback(void *arg)