diff options
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 17 |
1 files changed, 0 insertions, 17 deletions
@@ -3590,23 +3590,6 @@ void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags) | |||
3590 | EXPORT_SYMBOL(kmem_cache_alloc); | 3590 | EXPORT_SYMBOL(kmem_cache_alloc); |
3591 | 3591 | ||
3592 | /** | 3592 | /** |
3593 | * kmem_cache_zalloc - Allocate an object. The memory is set to zero. | ||
3594 | * @cache: The cache to allocate from. | ||
3595 | * @flags: See kmalloc(). | ||
3596 | * | ||
3597 | * Allocate an object from this cache and set the allocated memory to zero. | ||
3598 | * The flags are only relevant if the cache has no available objects. | ||
3599 | */ | ||
3600 | void *kmem_cache_zalloc(struct kmem_cache *cache, gfp_t flags) | ||
3601 | { | ||
3602 | void *ret = __cache_alloc(cache, flags, __builtin_return_address(0)); | ||
3603 | if (ret) | ||
3604 | memset(ret, 0, obj_size(cache)); | ||
3605 | return ret; | ||
3606 | } | ||
3607 | EXPORT_SYMBOL(kmem_cache_zalloc); | ||
3608 | |||
3609 | /** | ||
3610 | * kmem_ptr_validate - check if an untrusted pointer might | 3593 | * kmem_ptr_validate - check if an untrusted pointer might |
3611 | * be a slab entry. | 3594 | * be a slab entry. |
3612 | * @cachep: the cache we're checking against | 3595 | * @cachep: the cache we're checking against |