[PATCH] nvme-pci: use nvme core helper to cancel requests in tagset
liruozhu
liruozhu at huawei.com
Fri Jul 8 02:59:37 PDT 2022
On 2022/7/8 11:04, Guixin Liu wrote:
> Use nvme core helper nvme_cancel_tagset and nvme_cancel_admin_tagset
> instead of same logic code.
>
> Signed-off-by: Guixin Liu <kanie at linux.alibaba.com>
> ---
> drivers/nvme/host/pci.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index e7af223..ab4facf 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -2720,10 +2720,8 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
> nvme_pci_disable(dev);
> nvme_reap_pending_cqes(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);
> - blk_mq_tagset_wait_completed_request(&dev->tagset);
> - blk_mq_tagset_wait_completed_request(&dev->admin_tagset);
> + nvme_cancel_tagset(&dev->ctrl);
> + nvme_cancel_admin_tagset(&dev->ctrl);
>
> /*
> * The driver will not be starting up queues again if shutting down so
Looks good to me,
Reviewed-by:Ruozhu Li <liruozhu at huawei.com>
More information about the Linux-nvme
mailing list