Commit 4236e60
nvmet: pci-epf: cleanup nvmet_pci_epf_raise_irq()
There is no point in taking the controller irq_lock and calling
nvmet_pci_epf_should_raise_irq() for a completion queue which does not
have IRQ enabled (NVMET_PCI_EPF_Q_IRQ_ENABLED flag is not set).
Move the test for the NVMET_PCI_EPF_Q_IRQ_ENABLED flag out of
nvmet_pci_epf_should_raise_irq() to the top of nvmet_pci_epf_raise_irq()
to return early when no IRQ should be raised.
Also, use dev_err_ratelimited() to avoid a message storm under load when
raising IRQs is failing.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>1 parent 2c3a6f6 commit 4236e60
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
596 | 596 | | |
597 | 597 | | |
598 | 598 | | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | 599 | | |
603 | 600 | | |
604 | 601 | | |
| |||
625 | 622 | | |
626 | 623 | | |
627 | 624 | | |
628 | | - | |
| 625 | + | |
| 626 | + | |
629 | 627 | | |
630 | 628 | | |
631 | 629 | | |
| |||
658 | 656 | | |
659 | 657 | | |
660 | 658 | | |
661 | | - | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
| |||
0 commit comments