Commit 1793ed93 authored by Jeremy Linton's avatar Jeremy Linton Committed by Steven Rostedt (VMware)

trace: rename trace_enum_mutex to trace_eval_mutex

There is a lock protecting the trace_enum_map, rename
it to reflect the use by more than enums.

Link: http://lkml.kernel.org/r/20170531215653.3240-6-jeremy.linton@arm.comSigned-off-by: default avatarJeremy Linton <jeremy.linton@arm.com>
Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent 23bf8cb8
...@@ -138,7 +138,7 @@ struct trace_eval_map_tail { ...@@ -138,7 +138,7 @@ struct trace_eval_map_tail {
const char *end; /* points to NULL */ const char *end; /* points to NULL */
}; };
static DEFINE_MUTEX(trace_enum_mutex); static DEFINE_MUTEX(trace_eval_mutex);
/* /*
* The trace_eval_maps are saved in an array with two extra elements, * The trace_eval_maps are saved in an array with two extra elements,
...@@ -4785,7 +4785,7 @@ static void *enum_map_start(struct seq_file *m, loff_t *pos) ...@@ -4785,7 +4785,7 @@ static void *enum_map_start(struct seq_file *m, loff_t *pos)
union trace_eval_map_item *v; union trace_eval_map_item *v;
loff_t l = 0; loff_t l = 0;
mutex_lock(&trace_enum_mutex); mutex_lock(&trace_eval_mutex);
v = trace_eval_maps; v = trace_eval_maps;
if (v) if (v)
...@@ -4800,7 +4800,7 @@ static void *enum_map_start(struct seq_file *m, loff_t *pos) ...@@ -4800,7 +4800,7 @@ static void *enum_map_start(struct seq_file *m, loff_t *pos)
static void enum_map_stop(struct seq_file *m, void *v) static void enum_map_stop(struct seq_file *m, void *v)
{ {
mutex_unlock(&trace_enum_mutex); mutex_unlock(&trace_eval_mutex);
} }
static int enum_map_show(struct seq_file *m, void *v) static int enum_map_show(struct seq_file *m, void *v)
...@@ -4865,7 +4865,7 @@ trace_insert_enum_map_file(struct module *mod, struct trace_eval_map **start, ...@@ -4865,7 +4865,7 @@ trace_insert_enum_map_file(struct module *mod, struct trace_eval_map **start,
return; return;
} }
mutex_lock(&trace_enum_mutex); mutex_lock(&trace_eval_mutex);
if (!trace_eval_maps) if (!trace_eval_maps)
trace_eval_maps = map_array; trace_eval_maps = map_array;
...@@ -4890,7 +4890,7 @@ trace_insert_enum_map_file(struct module *mod, struct trace_eval_map **start, ...@@ -4890,7 +4890,7 @@ trace_insert_enum_map_file(struct module *mod, struct trace_eval_map **start,
} }
memset(map_array, 0, sizeof(*map_array)); memset(map_array, 0, sizeof(*map_array));
mutex_unlock(&trace_enum_mutex); mutex_unlock(&trace_eval_mutex);
} }
static void trace_create_enum_file(struct dentry *d_tracer) static void trace_create_enum_file(struct dentry *d_tracer)
...@@ -7768,7 +7768,7 @@ static void trace_module_remove_enums(struct module *mod) ...@@ -7768,7 +7768,7 @@ static void trace_module_remove_enums(struct module *mod)
if (!mod->num_trace_evals) if (!mod->num_trace_evals)
return; return;
mutex_lock(&trace_enum_mutex); mutex_lock(&trace_eval_mutex);
map = trace_eval_maps; map = trace_eval_maps;
...@@ -7785,7 +7785,7 @@ static void trace_module_remove_enums(struct module *mod) ...@@ -7785,7 +7785,7 @@ static void trace_module_remove_enums(struct module *mod)
*last = trace_enum_jmp_to_tail(map)->tail.next; *last = trace_enum_jmp_to_tail(map)->tail.next;
kfree(map); kfree(map);
out: out:
mutex_unlock(&trace_enum_mutex); mutex_unlock(&trace_eval_mutex);
} }
#else #else
static inline void trace_module_remove_enums(struct module *mod) { } static inline void trace_module_remove_enums(struct module *mod) { }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment