[PATCH v1] nvme-tcp: forward context to teardown admin queue function
Daniel Wagner
dwagner at suse.de
Mon Oct 14 09:53:29 PDT 2024
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 at 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
More information about the Linux-nvme
mailing list