nvme_fc: remove extra controller reference taken on reconnect
Subsystems (2)
PATCH 1/1 nvme_fc: remove extra controller reference taken on reconnect
From: James Smart <[email protected]>
remove extra controller reference taken on reconnect
Signed-off-by James Smart <james.smart at broadcom.com>
--- drivers/nvme/host/fc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/nvme/host/fc.c +3 -2
@@ -2395,13 +2395,14 @@ nvme_fc_create_association(struct nvme_fc_ctrl *ctrl) goto out_term_aen_ops; } +if (ctrl->ctrl.state ==NVME_CTRL_NEW ) +kref_get (&ctrl->ctrl.kref); + changed =nvme_change_ctrl_state (&ctrl->ctrl,NVME_CTRL_LIVE );WARN_ON_ONCE (!changed); ctrl->ctrl.opts->nr_reconnects =0 ; -kref_get (&ctrl->ctrl.kref); -if (ctrl->queue_count >1 ) {nvme_start_queues (&ctrl->ctrl);nvme_queue_scan (&ctrl->ctrl);
Signature · 1 line
2.11.0
PATCH 1/1 nvme_fc: remove extra controller reference taken on reconnect
Quoted 3 lines · On Thu, May 04, 2017@11:06:54AM -0700, [email protected] wrote:
From: James Smart <jsmart2021 at gmail.com>
remove extra controller reference taken on reconnect
I think proper fix would be to move the kref_get into nvme_fc_init_ctrl just after the call to nvme_fc_create_association.