diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-14 16:06:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-14 16:06:37 -0500 |
commit | 2744b8889cd6d4a730634400d337bee07d1702bc (patch) | |
tree | 91557775e3516d1df89141d588e9c7697f3583bb /mm | |
parent | 1ca7318cacdac5262492149cf46abc06c95693fa (diff) | |
parent | 68cee4f118c21a1c67e5764a91d766661db5b360 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
slub: Fix slub_lock down/up imbalance
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slub.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -3273,9 +3273,9 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size, | |||
3273 | kfree(n); | 3273 | kfree(n); |
3274 | kfree(s); | 3274 | kfree(s); |
3275 | } | 3275 | } |
3276 | err: | ||
3276 | up_write(&slub_lock); | 3277 | up_write(&slub_lock); |
3277 | 3278 | ||
3278 | err: | ||
3279 | if (flags & SLAB_PANIC) | 3279 | if (flags & SLAB_PANIC) |
3280 | panic("Cannot create slabcache %s\n", name); | 3280 | panic("Cannot create slabcache %s\n", name); |
3281 | else | 3281 | else |
@@ -3862,6 +3862,7 @@ static ssize_t show_slab_objects(struct kmem_cache *s, | |||
3862 | x += sprintf(buf + x, " N%d=%lu", | 3862 | x += sprintf(buf + x, " N%d=%lu", |
3863 | node, nodes[node]); | 3863 | node, nodes[node]); |
3864 | #endif | 3864 | #endif |
3865 | up_read(&slub_lock); | ||
3865 | kfree(nodes); | 3866 | kfree(nodes); |
3866 | return x + sprintf(buf + x, "\n"); | 3867 | return x + sprintf(buf + x, "\n"); |
3867 | } | 3868 | } |