Skip to content

Commit d631097

Browse files
idryomovrostedt
authored andcommitted
tracing: fix event_subsystem ref counting
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: 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>
1 parent c752d04 commit d631097

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

‎kernel/trace/trace_events.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,6 @@ event_subsystem_dir(const char *name, struct dentry *d_events)
10781078
/* First see if we did not already create this dir */
10791079
list_for_each_entry(system, &event_subsystems, list) {
10801080
if (strcmp(system->name, name) == 0) {
1081-
__get_system(system);
10821081
system->nr_events++;
10831082
return system->entry;
10841083
}

0 commit comments

Comments
 (0)