summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorKeith Busch <kbusch@kernel.org>2021-08-06 08:41:43 -0700
committerChristoph Hellwig <hch@lst.de>2021-08-16 14:42:24 +0200
commitd48f92cd2739258a1292be56bbeadb5b6a57ea09 (patch)
tree4d08a2c793da6a6f2dc726ee055562ccd0974fca /drivers/nvme
parenta5df5e79c43c84d9fb88f56b707c5ff52b27ccca (diff)
downloadlinux-d48f92cd2739258a1292be56bbeadb5b6a57ea09.tar.bz2
nvme-tcp: pair send_mutex init with destroy
Each mutex_init() should have a corresponding mutex_destroy(). Signed-off-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/tcp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 0a97ba02f61e..95d4cf777d24 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -1220,6 +1220,7 @@ static void nvme_tcp_free_queue(struct nvme_ctrl *nctrl, int qid)
sock_release(queue->sock);
kfree(queue->pdu);
+ mutex_destroy(&queue->send_mutex);
mutex_destroy(&queue->queue_lock);
}
@@ -1525,6 +1526,7 @@ err_sock:
sock_release(queue->sock);
queue->sock = NULL;
err_destroy_mutex:
+ mutex_destroy(&queue->send_mutex);
mutex_destroy(&queue->queue_lock);
return ret;
}