aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2004-09-13 17:47:15 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-09-13 17:47:15 -0700
commitb9915b919241c11142d754a19a65df569fc2cf52 (patch)
tree55445a18cd71241883b1131b5f71e21b2c79f390 /mm
parent7b2465589f14b634cc21a8fdf043c83f7f12f5f8 (diff)
downloadhistory-b9915b919241c11142d754a19a65df569fc2cf52.tar.gz
[PATCH] make kmem_find_general_cachep static in slab.c
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/slab.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/mm/slab.c b/mm/slab.c
index ecc4684f07df08..92777dae06f24b 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -562,6 +562,22 @@ static inline struct array_cache *ac_data(kmem_cache_t *cachep)
return cachep->array[smp_processor_id()];
}
+static kmem_cache_t * kmem_find_general_cachep (size_t size, int gfpflags)
+{
+ struct cache_sizes *csizep = malloc_sizes;
+
+ /* This function could be moved to the header file, and
+ * made inline so consumers can quickly determine what
+ * cache pointer they require.
+ */
+ for ( ; csizep->cs_size; csizep++) {
+ if (size > csizep->cs_size)
+ continue;
+ break;
+ }
+ return (gfpflags & GFP_DMA) ? csizep->cs_dmacachep : csizep->cs_cachep;
+}
+
/* Cal the num objs, wastage, and bytes left over for a given slab size. */
static void cache_estimate (unsigned long gfporder, size_t size, size_t align,
int flags, size_t *left_over, unsigned int *num)
@@ -2555,24 +2571,6 @@ unsigned int kmem_cache_size(kmem_cache_t *cachep)
EXPORT_SYMBOL(kmem_cache_size);
-kmem_cache_t * kmem_find_general_cachep (size_t size, int gfpflags)
-{
- struct cache_sizes *csizep = malloc_sizes;
-
- /* This function could be moved to the header file, and
- * made inline so consumers can quickly determine what
- * cache pointer they require.
- */
- for ( ; csizep->cs_size; csizep++) {
- if (size > csizep->cs_size)
- continue;
- break;
- }
- return (gfpflags & GFP_DMA) ? csizep->cs_dmacachep : csizep->cs_cachep;
-}
-
-EXPORT_SYMBOL(kmem_find_general_cachep);
-
struct ccupdate_struct {
kmem_cache_t *cachep;
struct array_cache *new[NR_CPUS];