In the CONFIG_SLAB=n case we want to save space - so let's save a few
more bytes.
Signed-off-by: Adrian Bunk <[email protected]>
---
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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]