diff options
author | Gary S. Robertson <gary.robertson@linaro.org> | 2016-01-20 15:36:59 -0600 |
---|---|---|
committer | Gary S. Robertson <gary.robertson@linaro.org> | 2016-01-20 15:36:59 -0600 |
commit | 370e05d463d66eaada3b4bb9266f019563920eb0 (patch) | |
tree | 348834a36436338eea1e9f17f1823cae213f92fc /drivers/block/nvme-core.c | |
parent | f93328edc6d139b9b1b5ed6944f7b80b8699cdf7 (diff) | |
parent | 906d9eadd3b6698fa6ceb9bcdf41da6aa56d0a24 (diff) |
Merge tag 'lsk-v4.1-15.12-rt' of http://git.linaro.org/kernel/linux-linaro-stable into linux-linaro-lng-v4.1-rtlinux-lng-preempt-rt-4.1.14-2016.03linux-lng-preempt-rt-4.1.14-2016.02linux-lng-preempt-rt-4.1.14-2016.01linux-linaro-lng-v4.1-rt
LSK RT 15.12 v4.1
Conflicts:
linaro/configs/linaro-base.conf
linaro/configs/preempt-rt.conf
linaro/configs/vexpress64.conf
Diffstat (limited to 'drivers/block/nvme-core.c')
-rw-r--r-- | drivers/block/nvme-core.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index 683dff272562..04c0e8f3183c 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c @@ -590,6 +590,7 @@ static void req_completion(struct nvme_queue *nvmeq, void *ctx, struct nvme_iod *iod = ctx; struct request *req = iod_get_private(iod); struct nvme_cmd_info *cmd_rq = blk_mq_rq_to_pdu(req); + bool requeue = false; u16 status = le16_to_cpup(&cqe->status) >> 1; @@ -598,12 +599,13 @@ static void req_completion(struct nvme_queue *nvmeq, void *ctx, && (jiffies - req->start_time) < req->timeout) { unsigned long flags; + requeue = true; blk_mq_requeue_request(req); spin_lock_irqsave(req->q->queue_lock, flags); if (!blk_queue_stopped(req->q)) blk_mq_kick_requeue_list(req->q); spin_unlock_irqrestore(req->q->queue_lock, flags); - return; + goto release_iod; } req->errors = nvme_error_status(status); } else @@ -613,7 +615,7 @@ static void req_completion(struct nvme_queue *nvmeq, void *ctx, dev_warn(&nvmeq->dev->pci_dev->dev, "completing aborted command with status:%04x\n", status); - + release_iod: if (iod->nents) { dma_unmap_sg(&nvmeq->dev->pci_dev->dev, iod->sg, iod->nents, rq_data_dir(req) ? DMA_TO_DEVICE : DMA_FROM_DEVICE); @@ -626,7 +628,8 @@ static void req_completion(struct nvme_queue *nvmeq, void *ctx, } nvme_free_iod(nvmeq->dev, iod); - blk_mq_complete_request(req); + if (likely(!requeue)) + blk_mq_complete_request(req); } /* length is in bytes. gfp flags indicates whether we may sleep. */ |