From: Jason Yan Date: Wed, 14 Dec 2022 13:38:06 +0000 (+0800) Subject: scsi: libsas: Remove useless dev_list delete in sas_ex_discover_end_dev() X-Git-Tag: v6.3-rc1~18^2~79^2~2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=8d2c9d25b725a699479d388da7e116d1d2bc0ea1;p=tomoyo%2Ftomoyo-test1.git scsi: libsas: Remove useless dev_list delete in sas_ex_discover_end_dev() The domain device 'child' is allocated in sas_ex_discover_end_dev() and used to be added to the dev_list in this function. After the following two fixes the device is added to the disco_list instead. As a result, the list_del() and locking left behind is now redundant. Fixes: 87c8331fcf72 ("[SCSI] libsas: prevent domain rediscovery competing with ata error handling") Fixes: 92625f9bff38 ("[SCSI] libsas: restore scan order") Cc: John Garry Signed-off-by: Jason Yan Reviewed-by: John Garry Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index a04cad620e93..29e1b93b0964 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c @@ -875,9 +875,6 @@ static struct domain_device *sas_ex_discover_end_dev( out_list_del: sas_rphy_free(child->rphy); list_del(&child->disco_list_node); - spin_lock_irq(&parent->port->dev_list_lock); - list_del(&child->dev_list_node); - spin_unlock_irq(&parent->port->dev_list_lock); out_free: sas_port_delete(phy->port); out_err: