* [2.6 patch] mm/slab.c: make kmem_cache_alloc_node static
@ 2005-03-06 19:20 Adrian Bunk
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2005-03-06 19:20 UTC (permalink / raw)
To: linux-kernel
kmem_cache_alloc_node isn't used outside of this file.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
include/linux/slab.h | 8 --------
mm/slab.c | 12 ++++++++++--
2 files changed, 10 insertions(+), 10 deletions(-)
--- linux-2.6.11-mm1-full/include/linux/slab.h.old 2005-03-06 15:40:31.000000000 +0100
+++ linux-2.6.11-mm1-full/include/linux/slab.h 2005-03-06 15:40:43.000000000 +0100
@@ -62,14 +62,6 @@
extern int kmem_cache_destroy(kmem_cache_t *);
extern int kmem_cache_shrink(kmem_cache_t *);
extern void *kmem_cache_alloc(kmem_cache_t *, int);
-#ifdef CONFIG_NUMA
-extern void *kmem_cache_alloc_node(kmem_cache_t *, int);
-#else
-static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int node)
-{
- return kmem_cache_alloc(cachep, GFP_KERNEL);
-}
-#endif
extern void kmem_cache_free(kmem_cache_t *, void *);
extern unsigned int kmem_cache_size(kmem_cache_t *);
--- linux-2.6.11-mm1-full/mm/slab.c.old 2005-03-06 15:40:38.000000000 +0100
+++ linux-2.6.11-mm1-full/mm/slab.c 2005-03-06 15:41:06.000000000 +0100
@@ -575,6 +575,15 @@
static void enable_cpucache (kmem_cache_t *cachep);
static void cache_reap (void *unused);
+#ifdef CONFIG_NUMA
+static void *kmem_cache_alloc_node(kmem_cache_t *, int);
+#else
+static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int node)
+{
+ return kmem_cache_alloc(cachep, GFP_KERNEL);
+}
+#endif
+
static inline void ** ac_entry(struct array_cache *ac)
{
return (void**)(ac+1);
@@ -2359,7 +2368,7 @@
* and can sleep. And it will allocate memory on the given node, which
* can improve the performance for cpu bound structures.
*/
-void *kmem_cache_alloc_node(kmem_cache_t *cachep, int nodeid)
+static void *kmem_cache_alloc_node(kmem_cache_t *cachep, int nodeid)
{
int loop;
void *objp;
@@ -2431,7 +2440,6 @@
__builtin_return_address(0));
return objp;
}
-EXPORT_SYMBOL(kmem_cache_alloc_node);
#endif
^ permalink raw reply [flat|nested] 2+ messages in thread
* [2.6 patch] mm/slab.c: make kmem_cache_alloc_node static
@ 2005-03-27 14:33 Adrian Bunk
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2005-03-27 14:33 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
kmem_cache_alloc_node isn't used outside of this file.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 6 Mar 2005
include/linux/slab.h | 8 --------
mm/slab.c | 12 ++++++++++--
2 files changed, 10 insertions(+), 10 deletions(-)
--- linux-2.6.11-mm1-full/include/linux/slab.h.old 2005-03-06 15:40:31.000000000 +0100
+++ linux-2.6.11-mm1-full/include/linux/slab.h 2005-03-06 15:40:43.000000000 +0100
@@ -62,14 +62,6 @@
extern int kmem_cache_destroy(kmem_cache_t *);
extern int kmem_cache_shrink(kmem_cache_t *);
extern void *kmem_cache_alloc(kmem_cache_t *, int);
-#ifdef CONFIG_NUMA
-extern void *kmem_cache_alloc_node(kmem_cache_t *, int);
-#else
-static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int node)
-{
- return kmem_cache_alloc(cachep, GFP_KERNEL);
-}
-#endif
extern void kmem_cache_free(kmem_cache_t *, void *);
extern unsigned int kmem_cache_size(kmem_cache_t *);
--- linux-2.6.11-mm1-full/mm/slab.c.old 2005-03-06 15:40:38.000000000 +0100
+++ linux-2.6.11-mm1-full/mm/slab.c 2005-03-06 15:41:06.000000000 +0100
@@ -575,6 +575,15 @@
static void enable_cpucache (kmem_cache_t *cachep);
static void cache_reap (void *unused);
+#ifdef CONFIG_NUMA
+static void *kmem_cache_alloc_node(kmem_cache_t *, int);
+#else
+static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int node)
+{
+ return kmem_cache_alloc(cachep, GFP_KERNEL);
+}
+#endif
+
static inline void ** ac_entry(struct array_cache *ac)
{
return (void**)(ac+1);
@@ -2359,7 +2368,7 @@
* and can sleep. And it will allocate memory on the given node, which
* can improve the performance for cpu bound structures.
*/
-void *kmem_cache_alloc_node(kmem_cache_t *cachep, int nodeid)
+static void *kmem_cache_alloc_node(kmem_cache_t *cachep, int nodeid)
{
int loop;
void *objp;
@@ -2431,7 +2440,6 @@
__builtin_return_address(0));
return objp;
}
-EXPORT_SYMBOL(kmem_cache_alloc_node);
#endif
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-03-27 14:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-27 14:33 [2.6 patch] mm/slab.c: make kmem_cache_alloc_node static Adrian Bunk
-- strict thread matches above, loose matches on Subject: below --
2005-03-06 19:20 Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox