mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 06:25:52 +02:00
tracing: fix event_subsystem ref counting
commitcb59974742upstream. Fix a bug introduced bye9dbfae5, 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> Link: http://lkml.kernel.org/r/1320052062-7846-1-git-send-email-idryomov@gmail.com Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
4ebbdc2c9a
commit
eda31b190f
|
|
@ -1096,7 +1096,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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user