diff mbox series

[PATCHv4,2/2] nvme: force complete cancelled requests

Message ID 20200529145200.3545747-2-kbusch@kernel.org (mailing list archive)
State New, archived
Headers show
Series [PATCHv4,1/2] blk-mq: blk-mq: provide forced completion method | expand

Commit Message

Keith Busch May 29, 2020, 2:52 p.m. UTC
Use blk_mq_foce_complete_rq() to bypass fake timeout error injection so
that request reclaim may proceed.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
 drivers/nvme/host/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel Wagner May 29, 2020, 3:42 p.m. UTC | #1
On Fri, May 29, 2020 at 07:52:00AM -0700, Keith Busch wrote:
> Use blk_mq_foce_complete_rq() to bypass fake timeout error injection so
> that request reclaim may proceed.
> 
> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> Reviewed-by: Ming Lei <ming.lei@redhat.com>
> Signed-off-by: Keith Busch <kbusch@kernel.org>

Reviewed-by: Daniel Wagner <dwagner@suse.de>
diff mbox series

Patch

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index ba860efd250d..891e9461bfae 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -310,7 +310,7 @@  bool nvme_cancel_request(struct request *req, void *data, bool reserved)
 		return true;
 
 	nvme_req(req)->status = NVME_SC_HOST_ABORTED_CMD;
-	blk_mq_complete_request(req);
+	blk_mq_force_complete_rq(req);
 	return true;
 }
 EXPORT_SYMBOL_GPL(nvme_cancel_request);