nvme: include admin_q sync with nvme_sync_queues
authorEdmund Nadolski <edmund.nadolski@intel.com>
Tue, 3 Sep 2019 20:08:47 +0000 (14:08 -0600)
committerSagi Grimberg <sagi@grimberg.me>
Thu, 12 Sep 2019 15:50:45 +0000 (08:50 -0700)
nvme_sync_queues currently syncs all namespace queues, but should
also sync the admin queue, if present.

Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
drivers/nvme/host/core.c

index 0545eb97d838ed3d5a2387950fcb5c3bdece2bcf..1777c8e6dffd06aa2dd60064ec524535b269ac09 100644 (file)
@@ -4010,6 +4010,9 @@ void nvme_sync_queues(struct nvme_ctrl *ctrl)
        list_for_each_entry(ns, &ctrl->namespaces, list)
                blk_sync_queue(ns->queue);
        up_read(&ctrl->namespaces_rwsem);
+
+       if (ctrl->admin_q)
+               blk_sync_queue(ctrl->admin_q);
 }
 EXPORT_SYMBOL_GPL(nvme_sync_queues);