summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2005-09-25 23:10:33 +0200
committerJames Bottomley <jejb@mulgrave.(none)>2005-09-25 17:19:35 -0500
commitfe8b2304e54552cea113318e2f66c45628130fdc (patch)
treed44cdc471ced18d6e41c8d25b857bb4381d6ec75
parent44550322cb601ac3f882e7438bbeec971fa1b1a3 (diff)
downloadop-kernel-dev-fe8b2304e54552cea113318e2f66c45628130fdc.zip
op-kernel-dev-fe8b2304e54552cea113318e2f66c45628130fdc.tar.gz
[SCSI] sas: fix remote phy removal
Brown paperbag bug: sas_rphy_delete was ordered completely wrong. Fix it up to be the same order as sas_phy_delete or fc_rport_terminate and fix rphy objects that leaked after module removal. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r--drivers/scsi/scsi_transport_sas.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c
index ff724bbe..1d145d2 100644
--- a/drivers/scsi/scsi_transport_sas.c
+++ b/drivers/scsi/scsi_transport_sas.c
@@ -628,17 +628,16 @@ sas_rphy_delete(struct sas_rphy *rphy)
struct Scsi_Host *shost = dev_to_shost(parent->dev.parent);
struct sas_host_attrs *sas_host = to_sas_host_attrs(shost);
- transport_destroy_device(&rphy->dev);
+ scsi_remove_target(dev);
- scsi_remove_target(&rphy->dev);
+ transport_remove_device(dev);
+ device_del(dev);
+ transport_destroy_device(dev);
spin_lock(&sas_host->lock);
list_del(&rphy->list);
spin_unlock(&sas_host->lock);
- transport_remove_device(dev);
- device_del(dev);
- transport_destroy_device(dev);
put_device(&parent->dev);
}
EXPORT_SYMBOL(sas_rphy_delete);
OpenPOWER on IntegriCloud