nvme-pci: consolidate code for polling non-dedicated queues
authorChristoph Hellwig <hch@lst.de>
Sun, 2 Dec 2018 16:46:20 +0000 (17:46 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 4 Dec 2018 18:38:18 +0000 (11:38 -0700)
commit0b2a8a9f4b564c7d923597828d93cd1f69ce40e0
tree0027c3ba78231c4ebcb10b1d1c8254395b07dcfe
parentc6d962aebaf8ec5d867aac09ee33e3f528c2539d
nvme-pci: consolidate code for polling non-dedicated queues

We have three places that can poll for I/O completions on a normal
interrupt-enabled queue.  All of them are in slow path code, so
consolidate them to a single helper that uses spin_lock_irqsave and
removes the fast path cqe_pending check.

Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/pci.c