summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew.r.wilcox@intel.com>2011-04-28 23:17:36 -0700
committerMatthew Wilcox <matthew.r.wilcox@intel.com>2011-11-04 15:53:02 -0400
commit21075bdee0a6f56058920d889df4ae561bfed754 (patch)
tree2472ca6f2df31c4d67123e31d6c0ecae5154d035 /drivers/block
parent09a58f536436efed02ead722e835cb4ce7674afc (diff)
downloadtalos-op-linux-21075bdee0a6f56058920d889df4ae561bfed754.tar.gz
talos-op-linux-21075bdee0a6f56058920d889df4ae561bfed754.zip
NVMe: Rename cancel_cmdid_data to cancel_cmdid
The trailing '_data' on the end was annoying and inconsistent. Also, make it actually return the data since this is needed for timing out commands. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/nvme.c7
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)
return data;
}
-static void cancel_cmdid_data(struct nvme_queue *nvmeq, int cmdid)
+static unsigned long cancel_cmdid(struct nvme_queue *nvmeq, int cmdid)
{
+ unsigned long data;
struct nvme_cmd_info *info = nvme_cmd_info(nvmeq);
+ data = info[cmdid].ctx;
info[cmdid].ctx = CMD_CTX_CANCELLED;
+ return data;
}
static struct nvme_queue *get_nvmeq(struct nvme_ns *ns)
@@ -667,7 +670,7 @@ static irqreturn_t nvme_irq_check(int irq, void *data)
static void nvme_abort_command(struct nvme_queue *nvmeq, int cmdid)
{
spin_lock_irq(&nvmeq->q_lock);
- cancel_cmdid_data(nvmeq, cmdid);
+ cancel_cmdid(nvmeq, cmdid);
spin_unlock_irq(&nvmeq->q_lock);
}
OpenPOWER on IntegriCloud