aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvme/target/loop.c
diff options
context:
space:
mode:
authorMax Gurtovoy <maxg@mellanox.com>2019-10-13 19:57:36 +0300
committerJens Axboe <axboe@kernel.dk>2019-11-04 10:56:41 -0700
commit16686f3a6c3cd6316dbc5cba886242c73f713237 (patch)
treef3e82a026c6f820216269488a0ea461002172a13 /drivers/nvme/target/loop.c
parentnvme: introduce "Command Aborted By host" status code (diff)
downloadlinux-dev-16686f3a6c3cd6316dbc5cba886242c73f713237.tar.xz
linux-dev-16686f3a6c3cd6316dbc5cba886242c73f713237.zip
nvme: move common call to nvme_cleanup_cmd to core layer
nvme_cleanup_cmd should be called for each call to nvme_setup_cmd (symmetrical functions). Move the call for nvme_cleanup_cmd to the common core layer and call it during nvme_complete_rq for the good flow. For error flow, each transport will call nvme_cleanup_cmd independently. Also take care of a special case of path failure, where we call nvme_complete_rq without doing nvme_setup_cmd. Signed-off-by: Max Gurtovoy <maxg@mellanox.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/target/loop.c')
-rw-r--r--drivers/nvme/target/loop.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c
index bd1f81f97ab7..5b7b19774bb0 100644
--- a/drivers/nvme/target/loop.c
+++ b/drivers/nvme/target/loop.c
@@ -76,7 +76,6 @@ static void nvme_loop_complete_rq(struct request *req)
{
struct nvme_loop_iod *iod = blk_mq_rq_to_pdu(req);
- nvme_cleanup_cmd(req);
sg_free_table_chained(&iod->sg_table, SG_CHUNK_SIZE);
nvme_complete_rq(req);
}