[PATCH] bcache: Move tracepoint symbols from bcache to bcache_util

DORMANTno replies

From: Christian Brunner <hidden>
Date: 2011-09-30 11:01:56
Subsystem: block layer, the rest · Maintainers: Jens Axboe, Linus Torvalds

Tracepoint symbols bcache_start_closure_wait and bcache_end_closure_wait
should be defined in bcache_util. Otherwise we get an circular
dependency between bcache.ko and bcache_util.ko, when bcache is compiled
as a module with CONFIG_TRACEPOINT enabled.

Thanks,
Christian

Signed-off-by: Christian Brunner <redacted>
---
 block/bcache.c      |    8 +-------
 block/bcache_util.c |    6 ++++++
 2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/block/bcache.c b/block/bcache.c
index b58e3f1..58ebe25 100644
--- a/block/bcache.c
+++ b/block/bcache.c
@@ -813,16 +813,10 @@ struct search {
 const char *insert_types[] = {
 	"read", "write", NULL, "writeback",
 	"undirty", NULL, "replay"
-}
+};
 
 #define insert_type(s)	insert_types[(s)->insert_type]
 
-#define CREATE_TRACE_POINTS
-#include <trace/events/bcache.h>
-
-EXPORT_TRACEPOINT_SYMBOL_GPL(bcache_start_closure_wait);
-EXPORT_TRACEPOINT_SYMBOL_GPL(bcache_end_closure_wait);
-
 static struct kobject *bcache_kobj;
 static struct mutex register_lock;
 static LIST_HEAD(uncached_devices);
diff --git a/block/bcache_util.c b/block/bcache_util.c
index 4104301..7da8ca8 100644
--- a/block/bcache_util.c
+++ b/block/bcache_util.c
@@ -10,6 +10,12 @@
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Kent Overstreet <kent.overstreet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>");
 
+#define CREATE_TRACE_POINTS
+#include <trace/events/bcache.h>
+
+EXPORT_TRACEPOINT_SYMBOL_GPL(bcache_start_closure_wait);
+EXPORT_TRACEPOINT_SYMBOL_GPL(bcache_end_closure_wait);
+
 #define STRTO_H(name, type)					\
 int name ## _h(const char *cp, type *res)		        \
 {								\
-- 
1.7.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help