aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/slab.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/slab.h')
-rw-r--r--include/linux/slab.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 9aa90a6f20e0..5ff9676c1e2c 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -58,7 +58,7 @@ int slab_is_available(void);
58 58
59struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, 59struct kmem_cache *kmem_cache_create(const char *, size_t, size_t,
60 unsigned long, 60 unsigned long,
61 void (*)(struct kmem_cache *, void *)); 61 void (*)(void *));
62void kmem_cache_destroy(struct kmem_cache *); 62void kmem_cache_destroy(struct kmem_cache *);
63int kmem_cache_shrink(struct kmem_cache *); 63int kmem_cache_shrink(struct kmem_cache *);
64void kmem_cache_free(struct kmem_cache *, void *); 64void kmem_cache_free(struct kmem_cache *, void *);
@@ -96,6 +96,7 @@ int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr);
96/* 96/*
97 * Common kmalloc functions provided by all allocators 97 * Common kmalloc functions provided by all allocators
98 */ 98 */
99void * __must_check __krealloc(const void *, size_t, gfp_t);
99void * __must_check krealloc(const void *, size_t, gfp_t); 100void * __must_check krealloc(const void *, size_t, gfp_t);
100void kfree(const void *); 101void kfree(const void *);
101size_t ksize(const void *); 102size_t ksize(const void *);
@@ -180,7 +181,7 @@ size_t ksize(const void *);
180 */ 181 */
181static inline void *kcalloc(size_t n, size_t size, gfp_t flags) 182static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
182{ 183{
183 if (n != 0 && size > ULONG_MAX / n) 184 if (size != 0 && n > ULONG_MAX / size)
184 return NULL; 185 return NULL;
185 return __kmalloc(n * size, flags | __GFP_ZERO); 186 return __kmalloc(n * size, flags | __GFP_ZERO);
186} 187}