diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/slab.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h index 3e3c3ab8ff94..7d66385ae750 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -62,16 +62,9 @@ extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned lo | |||
62 | extern int kmem_cache_destroy(kmem_cache_t *); | 62 | extern int kmem_cache_destroy(kmem_cache_t *); |
63 | extern int kmem_cache_shrink(kmem_cache_t *); | 63 | extern int kmem_cache_shrink(kmem_cache_t *); |
64 | extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast); | 64 | extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast); |
65 | #ifdef CONFIG_NUMA | ||
66 | extern void *kmem_cache_alloc_node(kmem_cache_t *, int); | ||
67 | #else | ||
68 | static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int node) | ||
69 | { | ||
70 | return kmem_cache_alloc(cachep, GFP_KERNEL); | ||
71 | } | ||
72 | #endif | ||
73 | extern void kmem_cache_free(kmem_cache_t *, void *); | 65 | extern void kmem_cache_free(kmem_cache_t *, void *); |
74 | extern unsigned int kmem_cache_size(kmem_cache_t *); | 66 | extern unsigned int kmem_cache_size(kmem_cache_t *); |
67 | extern kmem_cache_t *kmem_find_general_cachep(size_t size, int gfpflags); | ||
75 | 68 | ||
76 | /* Size description struct for general caches. */ | 69 | /* Size description struct for general caches. */ |
77 | struct cache_sizes { | 70 | struct cache_sizes { |
@@ -109,6 +102,20 @@ extern void *kcalloc(size_t, size_t, unsigned int __nocast); | |||
109 | extern void kfree(const void *); | 102 | extern void kfree(const void *); |
110 | extern unsigned int ksize(const void *); | 103 | extern unsigned int ksize(const void *); |
111 | 104 | ||
105 | #ifdef CONFIG_NUMA | ||
106 | extern void *kmem_cache_alloc_node(kmem_cache_t *, int flags, int node); | ||
107 | extern void *kmalloc_node(size_t size, int flags, int node); | ||
108 | #else | ||
109 | static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int node) | ||
110 | { | ||
111 | return kmem_cache_alloc(cachep, flags); | ||
112 | } | ||
113 | static inline void *kmalloc_node(size_t size, int flags, int node) | ||
114 | { | ||
115 | return kmalloc(size, flags); | ||
116 | } | ||
117 | #endif | ||
118 | |||
112 | extern int FASTCALL(kmem_cache_reap(int)); | 119 | extern int FASTCALL(kmem_cache_reap(int)); |
113 | extern int FASTCALL(kmem_ptr_validate(kmem_cache_t *cachep, void *ptr)); | 120 | extern int FASTCALL(kmem_ptr_validate(kmem_cache_t *cachep, void *ptr)); |
114 | 121 | ||