From: Christoph Hellwig <hch@lst.de>
To: akpm@osdl.org, manfred@colorfullife.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] make kmem_find_general_cachep static in slab.c
Date: Tue, 7 Sep 2004 16:36:32 +0200 [thread overview]
Message-ID: <20040907143632.GA8480@lst.de> (raw)
--- 1.35/include/linux/slab.h 2004-09-03 11:08:25 +02:00
+++ edited/include/linux/slab.h 2004-09-07 14:47:58 +02:00
@@ -55,7 +55,6 @@
/* 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));
--- 1.146/mm/slab.c 2004-09-03 11:08:25 +02:00
+++ edited/mm/slab.c 2004-09-07 14:48:33 +02:00
@@ -562,6 +562,22 @@
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)
@@ -2554,24 +2570,6 @@
}
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;
next reply other threads:[~2004-09-07 16:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-07 14:36 Christoph Hellwig [this message]
2004-09-07 16:50 ` [PATCH] make kmem_find_general_cachep static in slab.c Manfred Spraul
2004-09-07 16:52 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040907143632.GA8480@lst.de \
--to=hch@lst.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.