@@ -2548,24 +2548,17 @@ nvme_fc_error_recovery(struct nvme_fc_ctrl *ctrl, char *errmsg)
2548
2548
* the controller. Abort any ios on the association and let the
2549
2549
* create_association error path resolve things.
2550
2550
*/
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 ) {
2559
2552
__nvme_fc_abort_outstanding_ios (ctrl , true);
2553
+ set_bit (ASSOC_FAILED , & ctrl -> flags );
2560
2554
dev_warn (ctrl -> ctrl .device ,
2561
2555
"NVME-FC{%d}: transport error during (re)connect\n" ,
2562
2556
ctrl -> cnum );
2563
2557
return ;
2564
2558
}
2565
- spin_unlock_irqrestore (& ctrl -> lock , flags );
2566
2559
2567
2560
/* 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 )
2569
2562
return ;
2570
2563
2571
2564
dev_warn (ctrl -> ctrl .device ,
@@ -3180,16 +3173,12 @@ nvme_fc_create_association(struct nvme_fc_ctrl *ctrl)
3180
3173
else
3181
3174
ret = nvme_fc_recreate_io_queues (ctrl );
3182
3175
}
3183
-
3184
- spin_lock_irqsave (& ctrl -> lock , flags );
3185
3176
if (!ret && test_bit (ASSOC_FAILED , & ctrl -> flags ))
3186
3177
ret = - EIO ;
3187
- if (ret ) {
3188
- spin_unlock_irqrestore (& ctrl -> lock , flags );
3178
+ if (ret )
3189
3179
goto out_term_aen_ops ;
3190
- }
3180
+
3191
3181
changed = nvme_change_ctrl_state (& ctrl -> ctrl , NVME_CTRL_LIVE );
3192
- spin_unlock_irqrestore (& ctrl -> lock , flags );
3193
3182
3194
3183
ctrl -> ctrl .nr_reconnects = 0 ;
3195
3184
0 commit comments