[PATCH 13/16] nvme-auth: remove redundant auth_work flush

Hannes Reinecke hare at suse.de
Wed Nov 9 09:41:15 PST 2022


On 11/9/22 04:44, Sagi Grimberg wrote:
> only ctrl deletion calls nvme_auth_free, which was stopped prior in the
> teardown stage, so there is no possibility that it should ever run when
> nvme_auth_free is called.
> 
> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
> ---
>   drivers/nvme/host/auth.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c
> index b78e0df54f6c..0159179c2455 100644
> --- a/drivers/nvme/host/auth.c
> +++ b/drivers/nvme/host/auth.c
> @@ -988,10 +988,8 @@ void nvme_auth_free(struct nvme_ctrl *ctrl)
>   	struct nvme_dhchap_queue_context *chap;
>   	int i;
>   
> -	nvme_foreach_dhchap(i, chap, ctrl) {
> -		flush_work(&chap->auth_work);
> +	nvme_foreach_dhchap(i, chap, ctrl)
>   		nvme_auth_free_dhchap(chap);
> -	}
>   	if (ctrl->host_key) {
>   		nvme_auth_free_key(ctrl->host_key);
>   		ctrl->host_key = NULL;

Reviewed-by: Hannes Reinecke <hare at suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare at suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman




More information about the Linux-nvme mailing list