summaryrefslogtreecommitdiff
path: root/drivers/nvme/host/pci.c
diff options
context:
space:
mode:
authorMing Lin <ming.l@ssi.samsung.com>2016-04-25 21:33:20 (GMT)
committerJens Axboe <axboe@fb.com>2016-05-02 15:11:58 (GMT)
commit6904242db1ac07403c331b18796f6c2bf5382aec (patch)
treef185d0bf1e52827df0e6c5f23eea595e91f6dc25 /drivers/nvme/host/pci.c
parentf866fc4282a81673ef973ad54c68235a3263b42e (diff)
downloadlinux-6904242db1ac07403c331b18796f6c2bf5382aec.tar.xz
nvme: add helper nvme_cleanup_cmd()
This hides command cleanup into nvme.h and fabrics drivers will also use it. Signed-off-by: Ming Lin <ming.l@ssi.samsung.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme/host/pci.c')
-rw-r--r--drivers/nvme/host/pci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 82a0fc2..077e9bf 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -321,8 +321,7 @@ static void nvme_free_iod(struct nvme_dev *dev, struct request *req)
__le64 **list = iod_list(req);
dma_addr_t prp_dma = iod->first_dma;
- if (req->cmd_flags & REQ_DISCARD)
- kfree(req->completion_data);
+ nvme_cleanup_cmd(req);
if (iod->npages == 0)
dma_pool_free(dev->prp_small_pool, list[0], prp_dma);