Skip to content

Commit 915f04c

Browse files
author
Christoph Hellwig
committed
nvme-pci: move the call to nvme_cleanup_cmd out of nvme_unmap_data
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 <[email protected]> Reviewed-by: Keith Busch <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]>
1 parent 9b04811 commit 915f04c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/host/pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,6 @@ static void nvme_unmap_data(struct nvme_dev *dev, struct request *req)
888888
dma_unmap_sg(dev->dev, &iod->meta_sg, 1, dma_dir);
889889
}
890890

891-
nvme_cleanup_cmd(req);
892891
nvme_free_iod(dev, req);
893892
}
894893

@@ -939,6 +938,7 @@ static void nvme_pci_complete_rq(struct request *req)
939938
{
940939
struct nvme_iod *iod = blk_mq_rq_to_pdu(req);
941940

941+
nvme_cleanup_cmd(req);
942942
nvme_unmap_data(iod->nvmeq->dev, req);
943943
nvme_complete_rq(req);
944944
}

0 commit comments

Comments
 (0)