diff options
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -2035,9 +2035,17 @@ static void flush_cpu_slab(void *d) | |||
2035 | __flush_cpu_slab(s, smp_processor_id()); | 2035 | __flush_cpu_slab(s, smp_processor_id()); |
2036 | } | 2036 | } |
2037 | 2037 | ||
2038 | static bool has_cpu_slab(int cpu, void *info) | ||
2039 | { | ||
2040 | struct kmem_cache *s = info; | ||
2041 | struct kmem_cache_cpu *c = per_cpu_ptr(s->cpu_slab, cpu); | ||
2042 | |||
2043 | return !!(c->page); | ||
2044 | } | ||
2045 | |||
2038 | static void flush_all(struct kmem_cache *s) | 2046 | static void flush_all(struct kmem_cache *s) |
2039 | { | 2047 | { |
2040 | on_each_cpu(flush_cpu_slab, s, 1); | 2048 | on_each_cpu_cond(has_cpu_slab, flush_cpu_slab, s, 1, GFP_ATOMIC); |
2041 | } | 2049 | } |
2042 | 2050 | ||
2043 | /* | 2051 | /* |