@@ -2548,24 +2548,17 @@ nvme_fc_error_recovery(struct nvme_fc_ctrl *ctrl, char *errmsg)
25482548 * the controller. Abort any ios on the association and let the
25492549 * create_association error path resolve things.
25502550 */
2551- enum nvme_ctrl_state state ;
2552- unsigned long flags ;
2553-
2554- spin_lock_irqsave (& ctrl -> lock , flags );
2555- state = ctrl -> ctrl .state ;
2556- if (state == NVME_CTRL_CONNECTING ) {
2557- set_bit (ASSOC_FAILED , & ctrl -> flags );
2558- spin_unlock_irqrestore (& ctrl -> lock , flags );
2551+ if (ctrl -> ctrl .state == NVME_CTRL_CONNECTING ) {
25592552 __nvme_fc_abort_outstanding_ios (ctrl , true);
2553+ set_bit (ASSOC_FAILED , & ctrl -> flags );
25602554 dev_warn (ctrl -> ctrl .device ,
25612555 "NVME-FC{%d}: transport error during (re)connect\n" ,
25622556 ctrl -> cnum );
25632557 return ;
25642558 }
2565- spin_unlock_irqrestore (& ctrl -> lock , flags );
25662559
25672560 /* Otherwise, only proceed if in LIVE state - e.g. on first error */
2568- if (state != NVME_CTRL_LIVE )
2561+ if (ctrl -> ctrl . state != NVME_CTRL_LIVE )
25692562 return ;
25702563
25712564 dev_warn (ctrl -> ctrl .device ,
@@ -3179,16 +3172,12 @@ nvme_fc_create_association(struct nvme_fc_ctrl *ctrl)
31793172 else
31803173 ret = nvme_fc_recreate_io_queues (ctrl );
31813174 }
3182-
3183- spin_lock_irqsave (& ctrl -> lock , flags );
31843175 if (!ret && test_bit (ASSOC_FAILED , & ctrl -> flags ))
31853176 ret = - EIO ;
3186- if (ret ) {
3187- spin_unlock_irqrestore (& ctrl -> lock , flags );
3177+ if (ret )
31883178 goto out_term_aen_ops ;
3189- }
3179+
31903180 changed = nvme_change_ctrl_state (& ctrl -> ctrl , NVME_CTRL_LIVE );
3191- spin_unlock_irqrestore (& ctrl -> lock , flags );
31923181
31933182 ctrl -> ctrl .nr_reconnects = 0 ;
31943183
0 commit comments