* [PATCH v1] nvme-tcp: forward context to teardown admin queue function
@ 2024-10-14 16:53 Daniel Wagner
2024-10-15 4:55 ` Christoph Hellwig
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Daniel Wagner @ 2024-10-14 16:53 UTC (permalink / raw)
To: Hannes Reinecke, Sagi Grimberg, Christoph Hellwig, Keith Busch
Cc: linux-nvme, Daniel Wagner
nvme_tcp_setup_ctrl is called from different contexts. If the function
is called as part of the initial controller creation, the argument 'new'
is set to true. This tells the function to free all resources when an
error occurs.
Thus nvme_tcp_teardown_admin_queue should also be called with 'new' and
not always with 'false'.
Fixes: fd1418de10b9 ("nvme-tcp: avoid open-coding nvme_tcp_teardown_admin_queue()")
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
drivers/nvme/host/tcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 89c44413c593..c31434b4da73 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -2278,7 +2278,7 @@ static int nvme_tcp_setup_ctrl(struct nvme_ctrl *ctrl, bool new)
}
destroy_admin:
nvme_stop_keep_alive(ctrl);
- nvme_tcp_teardown_admin_queue(ctrl, false);
+ nvme_tcp_teardown_admin_queue(ctrl, new);
return ret;
}
--
2.47.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v1] nvme-tcp: forward context to teardown admin queue function
2024-10-14 16:53 [PATCH v1] nvme-tcp: forward context to teardown admin queue function Daniel Wagner
@ 2024-10-15 4:55 ` Christoph Hellwig
2024-10-20 23:49 ` Sagi Grimberg
2024-10-21 10:24 ` Hannes Reinecke
2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2024-10-15 4:55 UTC (permalink / raw)
To: Daniel Wagner
Cc: Hannes Reinecke, Sagi Grimberg, Christoph Hellwig, Keith Busch,
linux-nvme
On Mon, Oct 14, 2024 at 06:53:29PM +0200, Daniel Wagner wrote:
> nvme_tcp_setup_ctrl is called from different contexts. If the function
> is called as part of the initial controller creation, the argument 'new'
> is set to true. This tells the function to free all resources when an
> error occurs.
>
> Thus nvme_tcp_teardown_admin_queue should also be called with 'new' and
> not always with 'false'.
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] nvme-tcp: forward context to teardown admin queue function
2024-10-14 16:53 [PATCH v1] nvme-tcp: forward context to teardown admin queue function Daniel Wagner
2024-10-15 4:55 ` Christoph Hellwig
@ 2024-10-20 23:49 ` Sagi Grimberg
2024-10-21 10:24 ` Hannes Reinecke
2 siblings, 0 replies; 4+ messages in thread
From: Sagi Grimberg @ 2024-10-20 23:49 UTC (permalink / raw)
To: Daniel Wagner, Hannes Reinecke, Christoph Hellwig, Keith Busch; +Cc: linux-nvme
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] nvme-tcp: forward context to teardown admin queue function
2024-10-14 16:53 [PATCH v1] nvme-tcp: forward context to teardown admin queue function Daniel Wagner
2024-10-15 4:55 ` Christoph Hellwig
2024-10-20 23:49 ` Sagi Grimberg
@ 2024-10-21 10:24 ` Hannes Reinecke
2 siblings, 0 replies; 4+ messages in thread
From: Hannes Reinecke @ 2024-10-21 10:24 UTC (permalink / raw)
To: Daniel Wagner, Sagi Grimberg, Christoph Hellwig, Keith Busch; +Cc: linux-nvme
On 10/14/24 18:53, Daniel Wagner wrote:
> nvme_tcp_setup_ctrl is called from different contexts. If the function
> is called as part of the initial controller creation, the argument 'new'
> is set to true. This tells the function to free all resources when an
> error occurs.
>
> Thus nvme_tcp_teardown_admin_queue should also be called with 'new' and
> not always with 'false'.
>
> Fixes: fd1418de10b9 ("nvme-tcp: avoid open-coding nvme_tcp_teardown_admin_queue()")
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
> drivers/nvme/host/tcp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
> index 89c44413c593..c31434b4da73 100644
> --- a/drivers/nvme/host/tcp.c
> +++ b/drivers/nvme/host/tcp.c
> @@ -2278,7 +2278,7 @@ static int nvme_tcp_setup_ctrl(struct nvme_ctrl *ctrl, bool new)
> }
> destroy_admin:
> nvme_stop_keep_alive(ctrl);
> - nvme_tcp_teardown_admin_queue(ctrl, false);
> + nvme_tcp_teardown_admin_queue(ctrl, new);
> return ret;
> }
>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-21 10:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-14 16:53 [PATCH v1] nvme-tcp: forward context to teardown admin queue function Daniel Wagner
2024-10-15 4:55 ` Christoph Hellwig
2024-10-20 23:49 ` Sagi Grimberg
2024-10-21 10:24 ` Hannes Reinecke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).