kobject: grab the kset reference in kobject_add, not kobject_init
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 28 Nov 2007 18:46:22 +0000 (10:46 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 25 Jan 2008 04:40:25 +0000 (20:40 -0800)
kobject_init should not be grabing any references, but only initializing
the object.  This patch fixes this, and makes the lock hold-time shorter
for when a kset is present in the kobject.

The current kernel tree has been audited to verify that this change
should be safe.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

No differences found