]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tracing: fix event_subsystem ref counting
authorIlya Dryomov <idryomov@gmail.com>
Mon, 31 Oct 2011 09:07:42 +0000 (11:07 +0200)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Fri, 16 Dec 2011 01:38:19 +0000 (17:38 -0800)
commit778a74432a15099e73e45c1b813fa61ab685e3d6
tree51c5e7bb169b0db45520a50ed4da2da3ea6eefef
parent7fd529a1857091f3f671c4f0f8b7311a5969034e
tracing: fix event_subsystem ref counting

commit cb59974742aea24adf6637eb0c4b8e7b48bca6fb upstream.

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>
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>
kernel/trace/trace_events.c