* [PATCH] nvme/tcp: pair send_mutex init with destroy
@ 2021-08-06 15:41 Keith Busch
2021-08-06 19:32 ` Sagi Grimberg
2021-08-10 15:58 ` Christoph Hellwig
0 siblings, 2 replies; 3+ messages in thread
From: Keith Busch @ 2021-08-06 15:41 UTC (permalink / raw)
To: linux-nvme, sagi, hch; +Cc: Keith Busch
Each mutex_init() should have a corresponding mutex_destroy().
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
drivers/nvme/host/tcp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 8cb15ee5b249..b7a5e5e289dc 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -1228,6 +1228,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);
}
@@ -1533,6 +1534,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;
}
--
2.25.4
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] nvme/tcp: pair send_mutex init with destroy
2021-08-06 15:41 [PATCH] nvme/tcp: pair send_mutex init with destroy Keith Busch
@ 2021-08-06 19:32 ` Sagi Grimberg
2021-08-10 15:58 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Sagi Grimberg @ 2021-08-06 19:32 UTC (permalink / raw)
To: Keith Busch, linux-nvme, hch
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nvme/tcp: pair send_mutex init with destroy
2021-08-06 15:41 [PATCH] nvme/tcp: pair send_mutex init with destroy Keith Busch
2021-08-06 19:32 ` Sagi Grimberg
@ 2021-08-10 15:58 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2021-08-10 15:58 UTC (permalink / raw)
To: Keith Busch; +Cc: linux-nvme, sagi, hch
Applied to nvme-5.15.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-10 15:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06 15:41 [PATCH] nvme/tcp: pair send_mutex init with destroy Keith Busch
2021-08-06 19:32 ` Sagi Grimberg
2021-08-10 15:58 ` Christoph Hellwig
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.