[PATCH] nvme-core: initialize status to NVME_SC_HOST_PATH_ERROR

Chaitanya Kulkarni Chaitanya.Kulkarni at wdc.com
Tue Apr 13 04:19:50 BST 2021


On 4/12/21 16:55, Yuanyuan Zhong wrote:
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 0896e21642be..f22323d02755 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -580,6 +580,7 @@ static inline void nvme_clear_nvme_request(struct request *req)
>  		nvme_req(req)->flags = 0;
>  		req->rq_flags |= RQF_DONTPREP;
>  	}
> +	nvme_req(req)->status = NVME_SC_HOST_PATH_ERROR;
>  }
>  

Since setting the status to the error value in not common when
clearing the request this needs a good comment why we are doing it
in nvme_clear_nvme_request().





More information about the Linux-nvme mailing list