aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2010-08-25 15:07:16 -0400
committerPekka Enberg <penberg@kernel.org>2010-10-02 03:24:28 -0400
commit7d550c56a24b20e91ec469054230bd2e2485996a (patch)
tree04809fc2db67542b2a736ca6b130981514911bf2 /mm/slub.c
parent8df275af8db8220d7e3f1bf97b6ac7aad05f96f0 (diff)
slub: Add dummy functions for the !SLUB_DEBUG case
On Wed, 25 Aug 2010, Randy Dunlap wrote: > mm/slub.c:1732: error: implicit declaration of function 'slab_pre_alloc_hook' > mm/slub.c:1751: error: implicit declaration of function 'slab_post_alloc_hook' > mm/slub.c:1881: error: implicit declaration of function 'slab_free_hook' > mm/slub.c:1886: error: implicit declaration of function 'slab_free_hook_irq' Empty functions are missing if the runtime debuggability option is compiled out. Provide the fall back functions to empty hooks if SLUB_DEBUG is not set. Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 6608f2bc310b..c1add106c431 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1098,6 +1098,18 @@ static inline void inc_slabs_node(struct kmem_cache *s, int node,
1098 int objects) {} 1098 int objects) {}
1099static inline void dec_slabs_node(struct kmem_cache *s, int node, 1099static inline void dec_slabs_node(struct kmem_cache *s, int node,
1100 int objects) {} 1100 int objects) {}
1101
1102static inline int slab_pre_alloc_hook(struct kmem_cache *s, gfp_t flags)
1103 { return 0; }
1104
1105static inline void slab_post_alloc_hook(struct kmem_cache *s, gfp_t flags,
1106 void *object) {}
1107
1108static inline void slab_free_hook(struct kmem_cache *s, void *x) {}
1109
1110static inline void slab_free_hook_irq(struct kmem_cache *s,
1111 void *object) {}
1112
1101#endif 1113#endif
1102 1114
1103/* 1115/*