diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_vport.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_vport.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c index 1655507a682c..a5281ce893d0 100644 --- a/drivers/scsi/lpfc/lpfc_vport.c +++ b/drivers/scsi/lpfc/lpfc_vport.c | |||
@@ -580,7 +580,9 @@ lpfc_vport_delete(struct fc_vport *fc_vport) | |||
580 | "static vport.\n"); | 580 | "static vport.\n"); |
581 | return VPORT_ERROR; | 581 | return VPORT_ERROR; |
582 | } | 582 | } |
583 | 583 | spin_lock_irq(&phba->hbalock); | |
584 | vport->load_flag |= FC_UNLOADING; | ||
585 | spin_unlock_irq(&phba->hbalock); | ||
584 | /* | 586 | /* |
585 | * If we are not unloading the driver then prevent the vport_delete | 587 | * If we are not unloading the driver then prevent the vport_delete |
586 | * from happening until after this vport's discovery is finished. | 588 | * from happening until after this vport's discovery is finished. |
@@ -618,10 +620,6 @@ lpfc_vport_delete(struct fc_vport *fc_vport) | |||
618 | scsi_host_put(shost); | 620 | scsi_host_put(shost); |
619 | return VPORT_INVAL; | 621 | return VPORT_INVAL; |
620 | } | 622 | } |
621 | spin_lock_irq(&phba->hbalock); | ||
622 | vport->load_flag |= FC_UNLOADING; | ||
623 | spin_unlock_irq(&phba->hbalock); | ||
624 | |||
625 | lpfc_free_sysfs_attr(vport); | 623 | lpfc_free_sysfs_attr(vport); |
626 | 624 | ||
627 | lpfc_debugfs_terminate(vport); | 625 | lpfc_debugfs_terminate(vport); |