All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tracing: fix event_subsystem ref counting
@ 2011-10-31  9:07 Ilya Dryomov
  2011-10-31 16:14 ` Steven Rostedt
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ilya Dryomov @ 2011-10-31  9:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Steven Rostedt, idryomov

Fix a bug introduced by e9dbfae5, which prevents event_subsystem from
ever being released.

Ref_count was added to keep track of subsystem users, not for counting
events.  Subsystem is created with ref_count = 1, so there is no need to
increment it for every event, we have nr_events for that.  Fix this by
touching ref_count only when we actually have a new user -
subsystem_open().

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
---
 kernel/trace/trace_events.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 581876f..c212a7f 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -1078,7 +1078,6 @@ event_subsystem_dir(const char *name, struct dentry *d_events)
 	/* First see if we did not already create this dir */
 	list_for_each_entry(system, &event_subsystems, list) {
 		if (strcmp(system->name, name) == 0) {
-			__get_system(system);
 			system->nr_events++;
 			return system->entry;
 		}
-- 
1.7.6.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-12-06  6:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-31  9:07 [PATCH] tracing: fix event_subsystem ref counting Ilya Dryomov
2011-10-31 16:14 ` Steven Rostedt
2011-11-01  1:12   ` Li Zefan
2011-11-01  1:38     ` Steven Rostedt
2011-11-18 23:04 ` [tip:perf/core] " tip-bot for Ilya Dryomov
2011-12-06  6:25 ` tip-bot for Ilya Dryomov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.