Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330411
b: refs/heads/master
c: 455ce9e
h: refs/heads/master
i:
  330409: 71bbc14
  330407: 667ae56
v: v3
  • Loading branch information
Andrew Morton authored and Pekka Enberg committed Aug 16, 2012
1 parent f2e55f3 commit 23550f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 48f2474144ac708f1faad97e82a863ca8214b602
refs/heads/master: 455ce9eb1cfa083da0def023094190aeb133855a
15 changes: 5 additions & 10 deletions trunk/mm/slab_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,17 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size, size_t align
{
struct kmem_cache *s = NULL;

get_online_cpus();
mutex_lock(&slab_mutex);

#ifdef CONFIG_DEBUG_VM
if (!name || in_interrupt() || size < sizeof(void *) ||
size > KMALLOC_MAX_SIZE) {
printk(KERN_ERR "kmem_cache_create(%s) integrity check"
" failed\n", name);
goto out;
" failed\n", name);
goto oops;
}
#endif

get_online_cpus();
mutex_lock(&slab_mutex);

#ifdef CONFIG_DEBUG_VM
list_for_each_entry(s, &slab_caches, list) {
char tmp;
int res;
Expand Down Expand Up @@ -104,9 +102,6 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size, size_t align
mutex_unlock(&slab_mutex);
put_online_cpus();

#ifdef CONFIG_DEBUG_VM
out:
#endif
if (!s && (flags & SLAB_PANIC))
panic("kmem_cache_create: Failed to create slab '%s'\n", name);

Expand Down

0 comments on commit 23550f9

Please sign in to comment.