mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
nvme-tcp: fix bogus request completion when failing to send AER
commit 63573807b27e0faf8065a28b1bbe1cbfb23c0130 upstream. AER is not backed by a real request, hence we should not incorrectly assume that when failing to send a nvme command, it is a normal request but rather check if this is an aer and if so complete the aer (similar to the normal completion path). Cc: [email protected] Signed-off-by: Sagi Grimberg <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
a44ca40387
commit
153d0f357b
1 changed files with 9 additions and 1 deletions
|
|
@ -840,7 +840,15 @@ static inline void nvme_tcp_done_send_req(struct nvme_tcp_queue *queue)
|
|||
|
||||
static void nvme_tcp_fail_request(struct nvme_tcp_request *req)
|
||||
{
|
||||
nvme_tcp_end_request(blk_mq_rq_from_pdu(req), NVME_SC_HOST_PATH_ERROR);
|
||||
if (nvme_tcp_async_req(req)) {
|
||||
union nvme_result res = {};
|
||||
|
||||
nvme_complete_async_event(&req->queue->ctrl->ctrl,
|
||||
cpu_to_le16(NVME_SC_HOST_PATH_ERROR), &res);
|
||||
} else {
|
||||
nvme_tcp_end_request(blk_mq_rq_from_pdu(req),
|
||||
NVME_SC_HOST_PATH_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
static int nvme_tcp_try_send_data(struct nvme_tcp_request *req)
|
||||
|
|
|
|||
Loading…
Reference in a new issue