mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
nvme-tcp: simplify nvme_tcp_teardown_io_queues()
As nvme_tcp_teardown_io_queues() is the only one caller of nvme_tcp_destroy_admin_queue(), so we can merge it into nvme_tcp_teardown_io_queues() to simplify the code. Signed-off-by: Chunguang.xu <chunguang.xu@shopee.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
This commit is contained in:
committed by
Keith Busch
parent
fdc5664c69
commit
b4e12f5728
@@ -2101,14 +2101,6 @@ out_free_io_queues:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void nvme_tcp_destroy_admin_queue(struct nvme_ctrl *ctrl, bool remove)
|
||||
{
|
||||
nvme_tcp_stop_queue(ctrl, 0);
|
||||
if (remove)
|
||||
nvme_remove_admin_tag_set(ctrl);
|
||||
nvme_tcp_free_admin_queue(ctrl);
|
||||
}
|
||||
|
||||
static int nvme_tcp_configure_admin_queue(struct nvme_ctrl *ctrl, bool new)
|
||||
{
|
||||
int error;
|
||||
@@ -2163,9 +2155,11 @@ static void nvme_tcp_teardown_admin_queue(struct nvme_ctrl *ctrl,
|
||||
blk_sync_queue(ctrl->admin_q);
|
||||
nvme_tcp_stop_queue(ctrl, 0);
|
||||
nvme_cancel_admin_tagset(ctrl);
|
||||
if (remove)
|
||||
if (remove) {
|
||||
nvme_unquiesce_admin_queue(ctrl);
|
||||
nvme_tcp_destroy_admin_queue(ctrl, remove);
|
||||
nvme_remove_admin_tag_set(ctrl);
|
||||
}
|
||||
nvme_tcp_free_admin_queue(ctrl);
|
||||
if (ctrl->tls_pskid) {
|
||||
dev_dbg(ctrl->device, "Wipe negotiated TLS_PSK %08x\n",
|
||||
ctrl->tls_pskid);
|
||||
|
||||
Reference in New Issue
Block a user