Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a159c64d authored by Sagi Grimberg's avatar Sagi Grimberg
Browse files

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: default avatarSagi Grimberg <sagi@grimberg.me>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent a34ca17a
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -414,9 +414,8 @@ static void nvme_loop_del_ctrl_work(struct work_struct *work)
	struct nvme_loop_ctrl *ctrl = container_of(work,
				struct nvme_loop_ctrl, delete_work);

	nvme_remove_namespaces(&ctrl->ctrl);
	nvme_loop_shutdown_ctrl(ctrl);
	nvme_uninit_ctrl(&ctrl->ctrl);
	nvme_loop_shutdown_ctrl(ctrl);
	nvme_put_ctrl(&ctrl->ctrl);
}

@@ -501,7 +500,6 @@ static void nvme_loop_reset_ctrl_work(struct work_struct *work)
	nvme_loop_destroy_admin_queue(ctrl);
out_disable:
	dev_warn(ctrl->ctrl.device, "Removing after reset failure\n");
	nvme_remove_namespaces(&ctrl->ctrl);
	nvme_uninit_ctrl(&ctrl->ctrl);
	nvme_put_ctrl(&ctrl->ctrl);
}