Commit 15fede12 authored by Jens Axboe's avatar Jens Axboe

Merge branch 'nvme-5.7' of git://git.infradead.org/nvme into block-5.7

Pull NVMe poll fix from Christoph.

* 'nvme-5.7' of git://git.infradead.org/nvme:
  nvme-pci: avoid race between nvme_reap_pending_cqes() and nvme_poll()
parents 1592cd15 9210c075
...@@ -1382,16 +1382,19 @@ static void nvme_disable_admin_queue(struct nvme_dev *dev, bool shutdown) ...@@ -1382,16 +1382,19 @@ static void nvme_disable_admin_queue(struct nvme_dev *dev, bool shutdown)
/* /*
* Called only on a device that has been disabled and after all other threads * Called only on a device that has been disabled and after all other threads
* that can check this device's completion queues have synced. This is the * that can check this device's completion queues have synced, except
* last chance for the driver to see a natural completion before * nvme_poll(). This is the last chance for the driver to see a natural
* nvme_cancel_request() terminates all incomplete requests. * completion before nvme_cancel_request() terminates all incomplete requests.
*/ */
static void nvme_reap_pending_cqes(struct nvme_dev *dev) static void nvme_reap_pending_cqes(struct nvme_dev *dev)
{ {
int i; int i;
for (i = dev->ctrl.queue_count - 1; i > 0; i--) for (i = dev->ctrl.queue_count - 1; i > 0; i--) {
spin_lock(&dev->queues[i].cq_poll_lock);
nvme_process_cq(&dev->queues[i]); nvme_process_cq(&dev->queues[i]);
spin_unlock(&dev->queues[i].cq_poll_lock);
}
} }
static int nvme_cmb_qdepth(struct nvme_dev *dev, int nr_io_queues, static int nvme_cmb_qdepth(struct nvme_dev *dev, int nr_io_queues,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment