hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/scsi/lpfc/lpfc_sli.c
....@@ -20816,20 +20816,20 @@
2081620816 static struct lpfc_io_buf *
2081720817 lpfc_get_io_buf_from_expedite_pool(struct lpfc_hba *phba)
2081820818 {
20819
- struct lpfc_io_buf *lpfc_ncmd;
20819
+ struct lpfc_io_buf *lpfc_ncmd = NULL, *iter;
2082020820 struct lpfc_io_buf *lpfc_ncmd_next;
2082120821 unsigned long iflag;
2082220822 struct lpfc_epd_pool *epd_pool;
2082320823
2082420824 epd_pool = &phba->epd_pool;
20825
- lpfc_ncmd = NULL;
2082620825
2082720826 spin_lock_irqsave(&epd_pool->lock, iflag);
2082820827 if (epd_pool->count > 0) {
20829
- list_for_each_entry_safe(lpfc_ncmd, lpfc_ncmd_next,
20828
+ list_for_each_entry_safe(iter, lpfc_ncmd_next,
2083020829 &epd_pool->list, list) {
20831
- list_del(&lpfc_ncmd->list);
20830
+ list_del(&iter->list);
2083220831 epd_pool->count--;
20832
+ lpfc_ncmd = iter;
2083320833 break;
2083420834 }
2083520835 }