diff options
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 | ||
2031 | static 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 | |||
2031 | static void flush_all(struct kmem_cache *s) | 2039 | static 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 | /* |