diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2011-10-31 09:07:42 (GMT) |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-10-31 17:59:23 (GMT) |
commit | d631097577f6fe027f4903f62eabced6445d19bf (patch) | |
tree | 42aacb1258942bcf51e4a2893f3303965997902b /kernel/trace | |
parent | c752d04066a36ae30b29795f3fa3f536292c1f8c (diff) | |
download | linux-fsl-qoriq-d631097577f6fe027f4903f62eabced6445d19bf.tar.xz |
tracing: fix event_subsystem ref counting
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().
Cc: stable@vger.kernel.org
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Link: http://lkml.kernel.org/r/1320052062-7846-1-git-send-email-idryomov@gmail.com
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | 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; } |