Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82922
b: refs/heads/master
c: ba84c73
h: refs/heads/master
v: v3
  • Loading branch information
root authored and Christoph Lameter committed Feb 4, 2008
1 parent c7d4e6a commit 833c70b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 064287807c9dd64688084d34c6748a326b5f3ec8
refs/heads/master: ba84c73c7ae21fc891a3c2576fa3be42752fce53
8 changes: 8 additions & 0 deletions trunk/mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1999,6 +1999,7 @@ static struct kmem_cache_node *early_kmem_cache_node_alloc(gfp_t gfpflags,
{
struct page *page;
struct kmem_cache_node *n;
unsigned long flags;

BUG_ON(kmalloc_caches->size < sizeof(struct kmem_cache_node));

Expand All @@ -2023,7 +2024,14 @@ static struct kmem_cache_node *early_kmem_cache_node_alloc(gfp_t gfpflags,
#endif
init_kmem_cache_node(n);
atomic_long_inc(&n->nr_slabs);
/*
* lockdep requires consistent irq usage for each lock
* so even though there cannot be a race this early in
* the boot sequence, we still disable irqs.
*/
local_irq_save(flags);
add_partial(n, page, 0);
local_irq_restore(flags);
return n;
}

Expand Down

0 comments on commit 833c70b

Please sign in to comment.