[PATCH] nvme-apple: use nvme core helper to cancel requests in tagset

liruozhu liruozhu at huawei.com
Fri Jul 8 03:01:24 PDT 2022


On 2022/7/8 11:06, 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/apple.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
> index d702d7d..7816b5a 100644
> --- a/drivers/nvme/host/apple.c
> +++ b/drivers/nvme/host/apple.c
> @@ -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
Looks good to me,

Reviewed-by: Ruozhu Li <liruozhu at huawei.com>



More information about the Linux-nvme mailing list