diff options
author | Christoph Lameter <clameter@sgi.com> | 2008-04-29 16:16:06 -0700 |
---|---|---|
committer | Pekka Enberg <penberg@cs.helsinki.fi> | 2008-05-02 00:27:13 +0300 |
commit | f6acb63508700b5f8cd817082b62c96ba907775e (patch) | |
tree | 0fc0cdd4660fdf186f3becc1b80d743f8d3edbea /mm | |
parent | f715e6f15ee167026581a8a2e09b2ed644b974aa (diff) |
slub: #ifdef simplification
If we make SLUB_DEBUG depend on SYSFS then we can simplify some
#ifdefs and avoid others.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slub.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/slub.c b/mm/slub.c index c9c12ac7961..d379b782fc8 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -217,7 +217,7 @@ struct track { enum track_item { TRACK_ALLOC, TRACK_FREE }; -#if defined(CONFIG_SYSFS) && defined(CONFIG_SLUB_DEBUG) +#ifdef CONFIG_SLUB_DEBUG static int sysfs_slab_add(struct kmem_cache *); static int sysfs_slab_alias(struct kmem_cache *, const char *); static void sysfs_slab_remove(struct kmem_cache *); @@ -3247,7 +3247,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, return slab_alloc(s, gfpflags, node, caller); } -#if (defined(CONFIG_SYSFS) && defined(CONFIG_SLUB_DEBUG)) || defined(CONFIG_SLABINFO) +#ifdef CONFIG_SLUB_DEBUG static unsigned long count_partial(struct kmem_cache_node *n, int (*get_count)(struct page *)) { @@ -3276,9 +3276,7 @@ static int count_free(struct page *page) { return page->objects - page->inuse; } -#endif -#if defined(CONFIG_SYSFS) && defined(CONFIG_SLUB_DEBUG) static int validate_slab(struct kmem_cache *s, struct page *page, unsigned long *map) { |