]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - kernel/module.c
tracing: Fix compile error in module tracepoints when MODULE_UNLOAD not set
[net-next-2.6.git] / kernel / module.c
index c968d3606dca8cbf9d4e3ba04bcb0a48091024e9..d9e237926b69e6eb0ce395769f9bb2b506eb8f9c 100644 (file)
@@ -59,8 +59,6 @@
 #define CREATE_TRACE_POINTS
 #include <trace/events/module.h>
 
-EXPORT_TRACEPOINT_SYMBOL(module_get);
-
 #if 0
 #define DEBUGP printk
 #else
@@ -467,6 +465,9 @@ MODINFO_ATTR(srcversion);
 static char last_unloaded_module[MODULE_NAME_LEN+1];
 
 #ifdef CONFIG_MODULE_UNLOAD
+
+EXPORT_TRACEPOINT_SYMBOL(module_get);
+
 /* Init the unload section of the module. */
 static void module_unload_init(struct module *mod)
 {
@@ -800,8 +801,7 @@ void module_put(struct module *module)
                preempt_disable();
                __this_cpu_dec(module->refptr->count);
 
-               trace_module_put(module, _RET_IP_,
-                                __this_cpu_read(module->refptr->count));
+               trace_module_put(module, _RET_IP_);
                /* Maybe they're waiting for us to drop reference? */
                if (unlikely(!module_is_live(module)))
                        wake_up_process(module->waiter);