diff --git a/mm/slab.h b/mm/slab.h index dc2688c055b8..89bfef6cb794 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -241,6 +241,7 @@ extern unsigned long get_each_object_track(struct kmem_cache *s, static inline void print_tracking(struct kmem_cache *s, void *object) { } +#ifdef CONFIG_SLUB static inline unsigned long get_each_object_track(struct kmem_cache *s, struct page *page, enum track_item alloc, int (*fn)(const struct kmem_cache *, const void *, @@ -249,6 +250,7 @@ static inline unsigned long get_each_object_track(struct kmem_cache *s, return 0; } #endif +#endif /* * Returns true if any of the specified slub_debug flags is enabled for the