Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57140
b: refs/heads/master
c: 8ffa687
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed May 31, 2007
1 parent cd97d7f commit efeed45
Show file tree
Hide file tree
Showing 2 changed files with 8 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: fbe9c9612930e0604dc99ef2da7e063fa3278817
refs/heads/master: 8ffa68755a0eddf3baeecd0e7612a5106cf2db23
7 changes: 7 additions & 0 deletions trunk/mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2435,6 +2435,7 @@ void __init kmem_cache_init(void)
*/
create_kmalloc_cache(&kmalloc_caches[0], "kmem_cache_node",
sizeof(struct kmem_cache_node), GFP_KERNEL);
kmalloc_caches[0].refcount = -1;
#endif

/* Able to allocate the per node structures */
Expand Down Expand Up @@ -2482,6 +2483,12 @@ static int slab_unmergeable(struct kmem_cache *s)
if (s->ctor)
return 1;

/*
* We may have set a slab to be unmergeable during bootstrap.
*/
if (s->refcount < 0)
return 1;

return 0;
}

Expand Down

0 comments on commit efeed45

Please sign in to comment.