From e1958e6534a2d4ebb2dfcd0b3f16ff8e277a5b0c Mon Sep 17 00:00:00 2001 From: Ming Lin Date: Wed, 18 May 2016 14:05:01 -0700 Subject: [PATCH] nvme: update and rename nvme_cancel_io to nvme_cancel_request nvme_cancel_io is a bit confusing (given the distinction of io/admin), so rename it to nvme_cancel_request. And update it a bit to pass in struct nvme_ctrl, so it can be used by Fabrics driver also. Signed-off-by: Ming Lin Reviewed-by: Christoph Hellwig Suggested-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Reviewed-by: Keith Busch Signed-off-by: Jens Axboe --- drivers/nvme/host/pci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 78dca3193ca4..4af61c909353 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -919,14 +919,14 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved) return BLK_EH_RESET_TIMER; } -static void nvme_cancel_io(struct request *req, void *data, bool reserved) +static void nvme_cancel_request(struct request *req, void *data, bool reserved) { int status; if (!blk_mq_request_started(req)) return; - dev_dbg_ratelimited(((struct nvme_dev *) data)->ctrl.device, + dev_dbg_ratelimited(((struct nvme_ctrl *) data)->device, "Cancelling I/O %d", req->tag); status = NVME_SC_ABORT_REQ; @@ -1722,8 +1722,8 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown) } nvme_pci_disable(dev); - blk_mq_tagset_busy_iter(&dev->tagset, nvme_cancel_io, dev); - blk_mq_tagset_busy_iter(&dev->admin_tagset, nvme_cancel_io, dev); + blk_mq_tagset_busy_iter(&dev->tagset, nvme_cancel_request, &dev->ctrl); + blk_mq_tagset_busy_iter(&dev->admin_tagset, nvme_cancel_request, &dev->ctrl); mutex_unlock(&dev->shutdown_lock); } -- 2.20.1