diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/nvme.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c index 205405e7f6b0..9ca9db903ceb 100644 --- a/drivers/block/nvme.c +++ b/drivers/block/nvme.c | |||
@@ -213,10 +213,13 @@ static unsigned long free_cmdid(struct nvme_queue *nvmeq, int cmdid) | |||
213 | return data; | 213 | return data; |
214 | } | 214 | } |
215 | 215 | ||
216 | static void cancel_cmdid_data(struct nvme_queue *nvmeq, int cmdid) | 216 | static unsigned long cancel_cmdid(struct nvme_queue *nvmeq, int cmdid) |
217 | { | 217 | { |
218 | unsigned long data; | ||
218 | struct nvme_cmd_info *info = nvme_cmd_info(nvmeq); | 219 | struct nvme_cmd_info *info = nvme_cmd_info(nvmeq); |
220 | data = info[cmdid].ctx; | ||
219 | info[cmdid].ctx = CMD_CTX_CANCELLED; | 221 | info[cmdid].ctx = CMD_CTX_CANCELLED; |
222 | return data; | ||
220 | } | 223 | } |
221 | 224 | ||
222 | static struct nvme_queue *get_nvmeq(struct nvme_ns *ns) | 225 | static struct nvme_queue *get_nvmeq(struct nvme_ns *ns) |
@@ -667,7 +670,7 @@ static irqreturn_t nvme_irq_check(int irq, void *data) | |||
667 | static void nvme_abort_command(struct nvme_queue *nvmeq, int cmdid) | 670 | static void nvme_abort_command(struct nvme_queue *nvmeq, int cmdid) |
668 | { | 671 | { |
669 | spin_lock_irq(&nvmeq->q_lock); | 672 | spin_lock_irq(&nvmeq->q_lock); |
670 | cancel_cmdid_data(nvmeq, cmdid); | 673 | cancel_cmdid(nvmeq, cmdid); |
671 | spin_unlock_irq(&nvmeq->q_lock); | 674 | spin_unlock_irq(&nvmeq->q_lock); |
672 | } | 675 | } |
673 | 676 | ||