All of lore.kernel.org
 help / color / mirror / Atom feed
* [-mm patch] make the dummy kmem_set_shrinker() a static inline
@ 2006-03-17 20:19 Adrian Bunk
  0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2006-03-17 20:19 UTC (permalink / raw)
  To: bharata; +Cc: Yoichi Yuasa, linux-kernel, Andrew Morton

In the CONFIG_SLAB=n case we want to save space - so let's save a few 
more bytes.


Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 include/linux/slab.h |    7 +++++++
 mm/slob.c            |    5 -----
 2 files changed, 7 insertions(+), 5 deletions(-)

--- linux-2.6.16-rc6-mm1-full/include/linux/slab.h.old	2006-03-17 13:39:18.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/include/linux/slab.h	2006-03-17 15:48:53.000000000 +0100
@@ -144,6 +144,9 @@
 extern int FASTCALL(kmem_cache_reap(int));
 extern int FASTCALL(kmem_ptr_validate(kmem_cache_t *cachep, void *ptr));
 
+struct shrinker;
+extern void kmem_set_shrinker(kmem_cache_t *cachep, struct shrinker *shrinker);
+
 #else /* CONFIG_SLOB */
 
 /* SLOB allocator routines */
@@ -176,6 +179,10 @@
 #define kmalloc_node(s, f, n) kmalloc(s, f)
 #define ____kmalloc kmalloc
 
+struct shrinker;
+static inline void kmem_set_shrinker(kmem_cache_t *cachep,
+				     struct shrinker *shrinker) {}
+
 #endif /* CONFIG_SLOB */
 
 /* System wide caches */
--- linux-2.6.16-rc6-mm1-full/mm/slob.c.old	2006-03-17 13:40:54.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/mm/slob.c	2006-03-17 13:41:01.000000000 +0100
@@ -240,11 +240,6 @@
 	return ((slob_t *)block - 1)->units * SLOB_UNIT;
 }
 
-void kmem_set_shrinker(kmem_cache_t *cachep, struct shrinker *shrinker)
-{
-}
-EXPORT_SYMBOL(kmem_set_shrinker);
-
 struct kmem_cache {
 	unsigned int size, align;
 	const char *name;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-17 20:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-17 20:19 [-mm patch] make the dummy kmem_set_shrinker() a static inline Adrian Bunk

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.