diff options
Diffstat (limited to 'include/linux/slab.h')
-rw-r--r-- | include/linux/slab.h | 5 |
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 | ||
59 | struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, | 59 | struct 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 *)); |
62 | void kmem_cache_destroy(struct kmem_cache *); | 62 | void kmem_cache_destroy(struct kmem_cache *); |
63 | int kmem_cache_shrink(struct kmem_cache *); | 63 | int kmem_cache_shrink(struct kmem_cache *); |
64 | void kmem_cache_free(struct kmem_cache *, void *); | 64 | void 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 | */ |
99 | void * __must_check __krealloc(const void *, size_t, gfp_t); | ||
99 | void * __must_check krealloc(const void *, size_t, gfp_t); | 100 | void * __must_check krealloc(const void *, size_t, gfp_t); |
100 | void kfree(const void *); | 101 | void kfree(const void *); |
101 | size_t ksize(const void *); | 102 | size_t ksize(const void *); |
@@ -180,7 +181,7 @@ size_t ksize(const void *); | |||
180 | */ | 181 | */ |
181 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | 182 | static 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 | } |