Re: [PATCH 4/6] scsi: libsas: remove useless dev_list delete in sas_ex_discover_end_dev()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/12/2022 08:16, Jason Yan wrote:
The domain device 'child' is allocated in sas_ex_discover_end_dev() and
never been added to dev_list. So remove the useless list_del() and
related locks.

Cc: John Garry <john.g.garry@xxxxxxxxxx>
Signed-off-by: Jason Yan <yanaijie@xxxxxxxxxx>
---
  drivers/scsi/libsas/sas_expander.c | 3 ---
  1 file changed, 3 deletions(-)

diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index a8af723fab3c..82ea7560a888 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);

Since we have the spin lock'ing, this seems to be have been intentionally added (and not some simple typo or similar) - any idea of the origin?

Thanks,
John

   out_free:
  	sas_port_delete(phy->port);
   out_err:




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux