* [PATCH] tracing: remove the found node directly before break the search-loop
@ 2013-07-25 3:53 Lai Jiangshan
0 siblings, 0 replies; only message in thread
From: Lai Jiangshan @ 2013-07-25 3:53 UTC (permalink / raw)
To: Steven Rostedt, Frederic Weisbecker, Ingo Molnar, LKML
Just a clean-up, but it gives us better readability.
Sign-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 7d85429..a44f501 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -1827,13 +1827,13 @@ static void trace_module_remove_events(struct module *mod)
/* Now free the file_operations */
list_for_each_entry(file_ops, &ftrace_module_file_list, list) {
- if (file_ops->mod == mod)
+ if (file_ops->mod == mod) {
+ list_del(&file_ops->list);
+ kfree(file_ops);
break;
+ }
}
- if (&file_ops->list != &ftrace_module_file_list) {
- list_del(&file_ops->list);
- kfree(file_ops);
- }
+
up_write(&trace_event_sem);
/*
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-07-25 3:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-25 3:53 [PATCH] tracing: remove the found node directly before break the search-loop Lai Jiangshan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox