]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: move common call to nvme_cleanup_cmd to core layer
authorMax Gurtovoy <maxg@mellanox.com>
Sun, 13 Oct 2019 16:57:36 +0000 (19:57 +0300)
committerJens Axboe <axboe@kernel.dk>
Mon, 4 Nov 2019 17:56:41 +0000 (10:56 -0700)
commit3346ebadcca7f6343093a0da33f6a0af258c5109
treef3e82a026c6f820216269488a0ea461002172a13
parentdde4b097c3d8e6d32e5dfd505810e6189fa5eba2
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>
drivers/nvme/host/core.c
drivers/nvme/host/fc.c
drivers/nvme/host/pci.c
drivers/nvme/host/rdma.c
drivers/nvme/target/loop.c