summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_events.c
diff options
context:
space:
mode:
authorzhangwei(Jovi) <jovi.zhangwei@huawei.com>2013-03-11 15:14:03 +0800
committerSteven Rostedt <rostedt@goodmis.org>2013-03-15 13:22:10 -0400
commit52f6ad6dc3f4c6de598fe7cc9b629888d624aa52 (patch)
treeae3d4edf8b44bf9e77e970e58411420e6e164b60 /kernel/trace/trace_events.c
parent36a78e9e8792bfb052643eaf9374f837e634982c (diff)
tracing: Rename trace_event_mutex to trace_event_sem
trace_event_mutex is an rw semaphore now, not a mutex, change the name. Link: http://lkml.kernel.org/r/513D843B.40109@huawei.com Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@huawei.com> [ Forward ported to my new code ] Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r--kernel/trace/trace_events.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index a71cdc3c5df..53582e982e5 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -1584,7 +1584,7 @@ int trace_add_event_call(struct ftrace_event_call *call)
}
/*
- * Must be called under locking both of event_mutex and trace_event_mutex.
+ * Must be called under locking both of event_mutex and trace_event_sem.
*/
static void __trace_remove_event_call(struct ftrace_event_call *call)
{
@@ -1597,9 +1597,9 @@ static void __trace_remove_event_call(struct ftrace_event_call *call)
void trace_remove_event_call(struct ftrace_event_call *call)
{
mutex_lock(&event_mutex);
- down_write(&trace_event_mutex);
+ down_write(&trace_event_sem);
__trace_remove_event_call(call);
- up_write(&trace_event_mutex);
+ up_write(&trace_event_sem);
mutex_unlock(&event_mutex);
}
@@ -1707,7 +1707,7 @@ static void trace_module_remove_events(struct module *mod)
struct ftrace_event_call *call, *p;
bool clear_trace = false;
- down_write(&trace_event_mutex);
+ down_write(&trace_event_sem);
list_for_each_entry_safe(call, p, &ftrace_events, list) {
if (call->mod == mod) {
if (call->flags & TRACE_EVENT_FL_WAS_ENABLED)
@@ -1725,7 +1725,7 @@ static void trace_module_remove_events(struct module *mod)
list_del(&file_ops->list);
kfree(file_ops);
}
- up_write(&trace_event_mutex);
+ up_write(&trace_event_sem);
/*
* It is safest to reset the ring buffer if the module being unloaded
@@ -2262,9 +2262,9 @@ int event_trace_add_tracer(struct dentry *parent, struct trace_array *tr)
if (ret)
goto out_unlock;
- down_write(&trace_event_mutex);
+ down_write(&trace_event_sem);
__trace_add_event_dirs(tr);
- up_write(&trace_event_mutex);
+ up_write(&trace_event_sem);
out_unlock:
mutex_unlock(&event_mutex);
@@ -2287,9 +2287,9 @@ early_event_add_tracer(struct dentry *parent, struct trace_array *tr)
if (ret)
goto out_unlock;
- down_write(&trace_event_mutex);
+ down_write(&trace_event_sem);
__trace_early_add_event_dirs(tr);
- up_write(&trace_event_mutex);
+ up_write(&trace_event_sem);
out_unlock:
mutex_unlock(&event_mutex);
@@ -2304,10 +2304,10 @@ int event_trace_del_tracer(struct trace_array *tr)
mutex_lock(&event_mutex);
- down_write(&trace_event_mutex);
+ down_write(&trace_event_sem);
__trace_remove_event_dirs(tr);
debugfs_remove_recursive(tr->event_dir);
- up_write(&trace_event_mutex);
+ up_write(&trace_event_sem);
tr->event_dir = NULL;