diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 93679f30a5af..5f5b2283d58c 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -2320,6 +2320,7 @@ lpfc_scsi_free(struct lpfc_hba *phba) | |||
2320 | 2320 | ||
2321 | spin_lock_irq(&phba->hbalock); | 2321 | spin_lock_irq(&phba->hbalock); |
2322 | /* Release all the lpfc_scsi_bufs maintained by this host. */ | 2322 | /* Release all the lpfc_scsi_bufs maintained by this host. */ |
2323 | spin_lock(&phba->scsi_buf_list_lock); | ||
2323 | list_for_each_entry_safe(sb, sb_next, &phba->lpfc_scsi_buf_list, list) { | 2324 | list_for_each_entry_safe(sb, sb_next, &phba->lpfc_scsi_buf_list, list) { |
2324 | list_del(&sb->list); | 2325 | list_del(&sb->list); |
2325 | pci_pool_free(phba->lpfc_scsi_dma_buf_pool, sb->data, | 2326 | pci_pool_free(phba->lpfc_scsi_dma_buf_pool, sb->data, |
@@ -2327,6 +2328,7 @@ lpfc_scsi_free(struct lpfc_hba *phba) | |||
2327 | kfree(sb); | 2328 | kfree(sb); |
2328 | phba->total_scsi_bufs--; | 2329 | phba->total_scsi_bufs--; |
2329 | } | 2330 | } |
2331 | spin_unlock(&phba->scsi_buf_list_lock); | ||
2330 | 2332 | ||
2331 | /* Release all the lpfc_iocbq entries maintained by this host. */ | 2333 | /* Release all the lpfc_iocbq entries maintained by this host. */ |
2332 | list_for_each_entry_safe(io, io_next, &phba->lpfc_iocb_list, list) { | 2334 | list_for_each_entry_safe(io, io_next, &phba->lpfc_iocb_list, list) { |
@@ -2334,9 +2336,7 @@ lpfc_scsi_free(struct lpfc_hba *phba) | |||
2334 | kfree(io); | 2336 | kfree(io); |
2335 | phba->total_iocbq_bufs--; | 2337 | phba->total_iocbq_bufs--; |
2336 | } | 2338 | } |
2337 | |||
2338 | spin_unlock_irq(&phba->hbalock); | 2339 | spin_unlock_irq(&phba->hbalock); |
2339 | |||
2340 | return 0; | 2340 | return 0; |
2341 | } | 2341 | } |
2342 | 2342 | ||