aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c
index f4a6229848fd..dcbb1926cb7f 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2028,9 +2028,17 @@ static void flush_cpu_slab(void *d)
2028 __flush_cpu_slab(s, smp_processor_id()); 2028 __flush_cpu_slab(s, smp_processor_id());
2029} 2029}
2030 2030
2031static bool has_cpu_slab(int cpu, void *info)
2032{
2033 struct kmem_cache *s = info;
2034 struct kmem_cache_cpu *c = per_cpu_ptr(s->cpu_slab, cpu);
2035
2036 return !!(c->page);
2037}
2038
2031static void flush_all(struct kmem_cache *s) 2039static void flush_all(struct kmem_cache *s)
2032{ 2040{
2033 on_each_cpu(flush_cpu_slab, s, 1); 2041 on_each_cpu_cond(has_cpu_slab, flush_cpu_slab, s, 1, GFP_ATOMIC);
2034} 2042}
2035 2043
2036/* 2044/*