}
        }
 
+       spin_lock_bh(&ep->ex_lock);
        /*
         * At this point, we have the exchange held.
         * Find or create the sequence.
                                 * sending RSP, hence write request on other
                                 * end never finishes.
                                 */
-                               spin_lock_bh(&ep->ex_lock);
                                sp->ssb_stat |= SSB_ST_RESP;
                                sp->id = fh->fh_seq_id;
-                               spin_unlock_bh(&ep->ex_lock);
                        } else {
+                               spin_unlock_bh(&ep->ex_lock);
+
                                /* sequence/exch should exist */
                                reject = FC_RJT_SEQ_ID;
                                goto rel;
 
        if (f_ctl & FC_FC_SEQ_INIT)
                ep->esb_stat |= ESB_ST_SEQ_INIT;
+       spin_unlock_bh(&ep->ex_lock);
 
        fr_seq(fp) = sp;
 out:
 
        f_ctl = ntoh24(fh->fh_f_ctl);
        fr_seq(fp) = sp;
+
+       spin_lock_bh(&ep->ex_lock);
        if (f_ctl & FC_FC_SEQ_INIT)
                ep->esb_stat |= ESB_ST_SEQ_INIT;
+       spin_unlock_bh(&ep->ex_lock);
 
        if (fc_sof_needs_ack(sof))
                fc_seq_send_ack(sp, fp);