mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
scsi: fnic: Refactor in_remove flag and call to fnic_fcpio_reset()
Modify logic to remove unnecessary acquire/release of spinlock to set in_remove flag. There's also no need to check for init status to call fnic_fcpio_reset. Tested-by: Karan Tilak Kumar <kartilak@cisco.com> Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com> Reviewed-by: Arun Easi <aeasi@cisco.com> Reviewed-by: Hannes Reinecke <hare@kernel.org> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Co-developed-by: Hannes Reinecke <hare@kernel.org> Link: https://patch.msgid.link/20260217223943.7938-4-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
31eda39bfd
commit
927b5282df
|
|
@ -1972,14 +1972,11 @@ void fnic_scsi_unload(struct fnic *fnic)
|
|||
*/
|
||||
spin_lock_irqsave(&fnic->fnic_lock, flags);
|
||||
fnic->iport.state = FNIC_IPORT_STATE_LINK_WAIT;
|
||||
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
|
||||
|
||||
if (fdls_get_state(&fnic->iport.fabric) != FDLS_STATE_INIT)
|
||||
fnic_fcpio_reset(fnic);
|
||||
spin_lock_irqsave(&fnic->fnic_lock, flags);
|
||||
fnic->in_remove = 1;
|
||||
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
|
||||
|
||||
fnic_fcpio_reset(fnic);
|
||||
|
||||
fnic_flush_tport_event_list(fnic);
|
||||
fnic_delete_fcp_tports(fnic);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user