aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/slub.c b/mm/slub.c
index a660834416ac..3f056677fa8f 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1999,6 +1999,7 @@ static struct kmem_cache_node *early_kmem_cache_node_alloc(gfp_t gfpflags,
1999{ 1999{
2000 struct page *page; 2000 struct page *page;
2001 struct kmem_cache_node *n; 2001 struct kmem_cache_node *n;
2002 unsigned long flags;
2002 2003
2003 BUG_ON(kmalloc_caches->size < sizeof(struct kmem_cache_node)); 2004 BUG_ON(kmalloc_caches->size < sizeof(struct kmem_cache_node));
2004 2005
@@ -2023,7 +2024,14 @@ static struct kmem_cache_node *early_kmem_cache_node_alloc(gfp_t gfpflags,
2023#endif 2024#endif
2024 init_kmem_cache_node(n); 2025 init_kmem_cache_node(n);
2025 atomic_long_inc(&n->nr_slabs); 2026 atomic_long_inc(&n->nr_slabs);
2027 /*
2028 * lockdep requires consistent irq usage for each lock
2029 * so even though there cannot be a race this early in
2030 * the boot sequence, we still disable irqs.
2031 */
2032 local_irq_save(flags);
2026 add_partial(n, page, 0); 2033 add_partial(n, page, 0);
2034 local_irq_restore(flags);
2027 return n; 2035 return n;
2028} 2036}
2029 2037