diff options
author | Steven Rostedt <[email protected]> | 2012-01-09 17:15:42 -0500 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2012-01-09 14:19:33 -0800 |
commit | 4dee6b64ee7cfef94b47733c6d9fef07f8051c7c (patch) | |
tree | 78bf53f15f2b0dbcb6b6c1e74faf32545f4ba8bb | |
parent | 6b3da11b3c36fdafce3a72e0e90d6c4e99e9aad5 (diff) |
tracing/mm: Move include of trace/events/kmem.h out of header into slab.c
Including trace/events/*.h TRACE_EVENT() macro headers in other headers
can cause strange side effects if another trace/event/*.h header
includes that header. Having trace/events/kmem.h inside slab_def.h
caused a compile error in sparc64 when changes were done to some header
files. Moving the kmem.h trace header out of slab.h and into slab.c
fixes the problem.
Note, both slub.c and slob.c already include the trace/events/kmem.h
file. Only slab.c had it missing.
Link: http://lkml.kernel.org/r/[email protected]
Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | include/linux/slab_def.h | 2 | ||||
-rw-r--r-- | mm/slab.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index d00e0bacda93..fbd1117fdfde 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h @@ -15,8 +15,6 @@ #include <asm/cache.h> /* kmalloc_sizes.h needs L1_CACHE_BYTES */ #include <linux/compiler.h> -#include <trace/events/kmem.h> - /* * struct kmem_cache * diff --git a/mm/slab.c b/mm/slab.c index 83311c9aaf9d..2acfa0d90943 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -121,6 +121,8 @@ #include <asm/tlbflush.h> #include <asm/page.h> +#include <trace/events/kmem.h> + /* * DEBUG - 1 for kmem_cache_create() to honour; SLAB_RED_ZONE & SLAB_POISON. * 0 for faster, smaller code (especially in the critical paths). |