diff mbox series

[19/62] mm/slub: Convert bootstrap() to struct slab

Message ID 20211004134650.4031813-20-willy@infradead.org (mailing list archive)
State New
Headers show
Series Separate struct slab from struct page | expand

Commit Message

Matthew Wilcox Oct. 4, 2021, 1:46 p.m. UTC
Adds a little type safety.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 mm/slub.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/mm/slub.c b/mm/slub.c
index fc1a7f7832c0..f760accb0feb 100644
--- 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);