mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
NVMe: Fix command setup on IO retry
On retry, the req->special is pointing to an already setup IOD, but we still need to setup the command context and callback, otherwise you'll see false twice completed errors and leak requests. Signed-off-by: Keith Busch <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
709c8667ad
commit
9af8785a38
1 changed files with 1 additions and 2 deletions
|
|
@ -640,8 +640,6 @@ static int nvme_queue_rq(struct blk_mq_hw_ctx *hctx,
|
|||
iod->private = req;
|
||||
req->special = iod;
|
||||
|
||||
nvme_set_info(cmd, iod, req_completion);
|
||||
|
||||
if (req->cmd_flags & REQ_DISCARD) {
|
||||
void *range;
|
||||
/*
|
||||
|
|
@ -677,6 +675,7 @@ static int nvme_queue_rq(struct blk_mq_hw_ctx *hctx,
|
|||
blk_mq_start_request(req);
|
||||
|
||||
submit_iod:
|
||||
nvme_set_info(cmd, iod, req_completion);
|
||||
spin_lock_irq(&nvmeq->q_lock);
|
||||
if (req->cmd_flags & REQ_DISCARD)
|
||||
nvme_submit_discard(nvmeq, ns, req, iod);
|
||||
|
|
|
|||
Loading…
Reference in a new issue