]> www.infradead.org Git - users/willy/linux.git/commitdiff
mm/slub: Convert bootstrap() to struct slab
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 1 Oct 2021 19:12:24 +0000 (15:12 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 4 Oct 2021 13:17:58 +0000 (09:17 -0400)
Adds a little type safety.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
mm/slub.c

index fc1a7f7832c0498e164a0a622af1ffc660903657..f760accb0febc9fc955bfdb5a3eaaf14d37c90c8 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4768,14 +4768,14 @@ static struct kmem_cache * __init bootstrap(struct kmem_cache *static_cache)
         */
        __flush_cpu_slab(s, smp_processor_id());
        for_each_kmem_cache_node(s, node, n) {
-               struct page *p;
+               struct slab *slab;
 
-               list_for_each_entry(p, &n->partial, slab_list)
-                       p->slab_cache = s;
+               list_for_each_entry(slab, &n->partial, slab_list)
+                       slab->slab_cache = s;
 
 #ifdef CONFIG_SLUB_DEBUG
-               list_for_each_entry(p, &n->full, slab_list)
-                       p->slab_cache = s;
+               list_for_each_entry(slab, &n->full, slab_list)
+                       slab->slab_cache = s;
 #endif
        }
        list_add(&s->list, &slab_caches);