From: Christoph Hellwig <hch@lst.de>


Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/include/linux/slab.h |    1 -
 25-akpm/mm/slab.c            |   34 ++++++++++++++++------------------
 2 files changed, 16 insertions(+), 19 deletions(-)

diff -puN include/linux/slab.h~make-kmem_find_general_cachep-static-in-slabc include/linux/slab.h
--- 25/include/linux/slab.h~make-kmem_find_general_cachep-static-in-slabc	Tue Sep  7 16:22:54 2004
+++ 25-akpm/include/linux/slab.h	Tue Sep  7 16:22:54 2004
@@ -55,7 +55,6 @@ typedef struct kmem_cache_s kmem_cache_t
 /* prototypes */
 extern void kmem_cache_init(void);
 
-extern kmem_cache_t *kmem_find_general_cachep(size_t, int gfpflags);
 extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned long,
 				       void (*)(void *, kmem_cache_t *, unsigned long),
 				       void (*)(void *, kmem_cache_t *, unsigned long));
diff -puN mm/slab.c~make-kmem_find_general_cachep-static-in-slabc mm/slab.c
--- 25/mm/slab.c~make-kmem_find_general_cachep-static-in-slabc	Tue Sep  7 16:22:54 2004
+++ 25-akpm/mm/slab.c	Tue Sep  7 16:22:54 2004
@@ -562,6 +562,22 @@ static inline struct array_cache *ac_dat
 	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_
 
 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];
_