From: Christoph Hellwig Date: Wed, 11 Jan 2006 13:20:43 +0000 (+0100) Subject: [SCSI] sas: clear parent->rphy in sas_rphy_delete X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=33b114e935a2202206e224dd2c695cee5a5986bf;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [SCSI] sas: clear parent->rphy in sas_rphy_delete We need to clear the backpointer on rphy removal, else we'll run into problems with host removal after a device has been hot unplugged. Signed-off-by: Christoph Hellwig Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index edabbd05d258..357b52f5f996 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c @@ -697,6 +697,8 @@ sas_rphy_delete(struct sas_rphy *rphy) list_del(&rphy->list); spin_unlock(&sas_host->lock); + parent->rphy = NULL; + put_device(&parent->dev); } EXPORT_SYMBOL(sas_rphy_delete);