]> git.baikalelectronics.ru Git - kernel.git/commitdiff
nvme-apple: use nvme core helper to cancel requests in tagset
authorGuixin Liu <kanie@linux.alibaba.com>
Fri, 8 Jul 2022 03:06:05 +0000 (11:06 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 2 Aug 2022 23:22:41 +0000 (17:22 -0600)
Use nvme core helper nvme_cancel_tagset and nvme_cancel_admin_tagset
instead of same logic code.

Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Ruozhu Li <liruozhu@huawei.com>
Reviewed-by: Sven Peter <sven@svenpeter.dev>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/apple.c

index 5c352d5d8ee67d2f0f258b808db3cd7339009478..0510e8e07346280fc2c4b3ad5240238078bc5389 100644 (file)
@@ -845,11 +845,8 @@ static void apple_nvme_disable(struct apple_nvme *anv, bool shutdown)
        apple_nvme_handle_cq(&anv->adminq, true);
        spin_unlock_irqrestore(&anv->lock, flags);
 
-       blk_mq_tagset_busy_iter(&anv->tagset, nvme_cancel_request, &anv->ctrl);
-       blk_mq_tagset_busy_iter(&anv->admin_tagset, nvme_cancel_request,
-                               &anv->ctrl);
-       blk_mq_tagset_wait_completed_request(&anv->tagset);
-       blk_mq_tagset_wait_completed_request(&anv->admin_tagset);
+       nvme_cancel_tagset(&anv->ctrl);
+       nvme_cancel_admin_tagset(&anv->ctrl);
 
        /*
         * The driver will not be starting up queues again if shutting down so