Cleaning up the command setup isn't related to unmapping data, and
disentangling them will simplify error handling a bit down the road.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
dma_unmap_sg(dev->dev, &iod->meta_sg, 1, dma_dir);
}
- nvme_cleanup_cmd(req);
nvme_free_iod(dev, req);
}
{
struct nvme_iod *iod = blk_mq_rq_to_pdu(req);
+ nvme_cleanup_cmd(req);
nvme_unmap_data(iod->nvmeq->dev, req);
nvme_complete_rq(req);
}