make the dummy kmem_set_shrinker() a static inline
Subsystems (2)
PATCH 1/1 make the dummy kmem_set_shrinker() a static inline
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(-)
include/linux/slab.h renamed from include/linux/slab.h.old +7 -0
@@ -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 */
mm/slob.c renamed from mm/slob.c.old +0 -5
@@ -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;