diff options
author | Christoph Lameter <clameter@sgi.com> | 2007-07-17 07:03:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 13:23:01 -0400 |
commit | 81cda6626178cd55297831296ba8ecedbfd8b52d (patch) | |
tree | fa35a6a04db63080bbeb42f33f4b4a891b7fc96c /mm/slub.c | |
parent | ce15fea8274acca06daa1674322d37a7d3f0036b (diff) |
Slab allocators: Cleanup zeroing allocations
It becomes now easy to support the zeroing allocs with generic inline
functions in slab.h. Provide inline definitions to allow the continued use of
kzalloc, kmem_cache_zalloc etc but remove other definitions of zeroing
functions from the slab allocators and util.c.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 11 |
1 files changed, 0 insertions, 11 deletions
@@ -2706,17 +2706,6 @@ err: | |||
2706 | } | 2706 | } |
2707 | EXPORT_SYMBOL(kmem_cache_create); | 2707 | EXPORT_SYMBOL(kmem_cache_create); |
2708 | 2708 | ||
2709 | void *kmem_cache_zalloc(struct kmem_cache *s, gfp_t flags) | ||
2710 | { | ||
2711 | void *x; | ||
2712 | |||
2713 | x = slab_alloc(s, flags, -1, __builtin_return_address(0)); | ||
2714 | if (x) | ||
2715 | memset(x, 0, s->objsize); | ||
2716 | return x; | ||
2717 | } | ||
2718 | EXPORT_SYMBOL(kmem_cache_zalloc); | ||
2719 | |||
2720 | #ifdef CONFIG_SMP | 2709 | #ifdef CONFIG_SMP |
2721 | /* | 2710 | /* |
2722 | * Use the cpu notifier to insure that the cpu slabs are flushed when | 2711 | * Use the cpu notifier to insure that the cpu slabs are flushed when |