[SCSI] libsas: fix domain_device leak
authorDan Williams <dan.j.williams@intel.com>
Fri, 18 Nov 2011 01:59:47 +0000 (17:59 -0800)
committerJames Bottomley <JBottomley@Parallels.com>
Sun, 19 Feb 2012 19:37:47 +0000 (13:37 -0600)
commit735f7d2fedf57380214221be7bed7f62d729e262
tree067db49c22dcbdf695a6517a6c8664b6bb2c2d32
parent6f4e75a49fd07d707995865493b9f452302ae36b
[SCSI] libsas: fix domain_device leak

Arrange for the deallocation of a struct domain_device object when it no
longer has:
1/ any children
2/ references by any scsi_targets
3/ references by a lldd

The comment about domain_device lifetime in
Documentation/scsi/libsas.txt is stale as it appears mainline never had
a version of a struct domain_device that was registered as a kobject.
We now manage domain_device reference counts on behalf of external
agents.

Reviewed-by: Jack Wang <jack_wang@usish.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Documentation/scsi/libsas.txt
drivers/scsi/libsas/sas_discover.c
drivers/scsi/libsas/sas_expander.c
drivers/scsi/libsas/sas_internal.h
drivers/scsi/libsas/sas_scsi_host.c
include/scsi/libsas.h