James Bottomley a1470c7bf3 [SCSI] enclosure: fix WARN_ON in dual path device removing
Bug report from: wenxiong@linux.vnet.ibm.com

The issue is happened in dual controller configuration. We got the
sysfs warnings when rmmod the ipr module.

enclosure_unregister() in drivers/msic/enclosure.c, call device_unregister()
for each componment deivce, device_unregister() ->device_del()->kobject_del()
->sysfs_remove_dir(). In sysfs_remove_dir(), set kobj->sd = NULL.

For each componment device,
enclosure_component_release()->enclosure_remove_links()->sysfs_remove_link()
in which checking kobj->sd again, it has been set as NULL when doing
device_unregister. So we saw all these sysfs WARNING.

Tested-by: wenxiong@linux.vnet.ibm.com
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-12-02 11:13:14 -08:00
..
2012-11-21 12:51:53 -08:00
2012-11-21 12:51:53 -08:00
2013-05-28 12:02:13 +02:00
2013-04-11 12:39:02 -07:00
2013-08-27 08:28:01 -07:00
2012-11-21 12:53:32 -08:00
2013-11-16 12:21:40 -08:00
2013-03-02 08:52:17 -06:00
2013-11-16 12:21:40 -08:00