Skip to content

Commit

Permalink
tracing: fix event_subsystem ref counting
Browse files Browse the repository at this point in the history
Fix a bug introduced by e9dbfae, 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().

Cc: [email protected]
Signed-off-by: Ilya Dryomov <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Steven Rostedt <[email protected]>
  • Loading branch information
idryomov authored and rostedt committed Dec 5, 2011
1 parent dc440d1 commit cb59974
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion kernel/trace/trace_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit cb59974

Please sign in to comment.