Skip to content

Commit bddb911

Browse files
committed
nvme: skip trace completion for host path errors
The command was never dispatched for the driver's "host path error", so the command was never actually initialized and there's no corresponding submit trace for the completion. Reported-by: Minsik Jeon <hmi.jeon@samsung.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
1 parent cf92d78 commit bddb911

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

drivers/nvme/host/core.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,11 +454,10 @@ void nvme_end_req(struct request *req)
454454
blk_mq_end_request(req, status);
455455
}
456456

457-
void nvme_complete_rq(struct request *req)
457+
static void __nvme_complete_rq(struct request *req)
458458
{
459459
struct nvme_ctrl *ctrl = nvme_req(req)->ctrl;
460460

461-
trace_nvme_complete_rq(req);
462461
nvme_cleanup_cmd(req);
463462

464463
/*
@@ -493,6 +492,12 @@ void nvme_complete_rq(struct request *req)
493492
return;
494493
}
495494
}
495+
496+
void nvme_complete_rq(struct request *req)
497+
{
498+
trace_nvme_complete_rq(req);
499+
__nvme_complete_rq(req);
500+
}
496501
EXPORT_SYMBOL_GPL(nvme_complete_rq);
497502

498503
void nvme_complete_batch_req(struct request *req)
@@ -513,7 +518,7 @@ blk_status_t nvme_host_path_error(struct request *req)
513518
{
514519
nvme_req(req)->status = NVME_SC_HOST_PATH_ERROR;
515520
blk_mq_set_request_complete(req);
516-
nvme_complete_rq(req);
521+
__nvme_complete_rq(req);
517522
return BLK_STS_OK;
518523
}
519524
EXPORT_SYMBOL_GPL(nvme_host_path_error);

0 commit comments

Comments
 (0)