Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nvme-loop: Remove duplicate call to nvme_remove_namespaces

nvme_uninit_ctrl already does that for us. Note that we
reordered nvme_loop_shutdown_ctrl with nvme_uninit_ctrl
but its safe because we want controller uninit to happen
before we shutdown the transport resources.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>

+1 -3
+1 -3
drivers/nvme/target/loop.c
··· 414 414 struct nvme_loop_ctrl *ctrl = container_of(work, 415 415 struct nvme_loop_ctrl, delete_work); 416 416 417 - nvme_remove_namespaces(&ctrl->ctrl); 418 - nvme_loop_shutdown_ctrl(ctrl); 419 417 nvme_uninit_ctrl(&ctrl->ctrl); 418 + nvme_loop_shutdown_ctrl(ctrl); 420 419 nvme_put_ctrl(&ctrl->ctrl); 421 420 } 422 421 ··· 500 501 nvme_loop_destroy_admin_queue(ctrl); 501 502 out_disable: 502 503 dev_warn(ctrl->ctrl.device, "Removing after reset failure\n"); 503 - nvme_remove_namespaces(&ctrl->ctrl); 504 504 nvme_uninit_ctrl(&ctrl->ctrl); 505 505 nvme_put_ctrl(&ctrl->ctrl); 506 506 }