Commit d48f92cd authored by Keith Busch's avatar Keith Busch Committed by Christoph Hellwig
Browse files

nvme-tcp: pair send_mutex init with destroy



Each mutex_init() should have a corresponding mutex_destroy().

Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent a5df5e79
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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 @@ static int nvme_tcp_alloc_queue(struct nvme_ctrl *nctrl,
	sock_release(queue->sock);
	queue->sock = NULL;
err_destroy_mutex:
	mutex_destroy(&queue->send_mutex);
	mutex_destroy(&queue->queue_lock);
	return ret;
}