struct nvmet_fc_fcp_iod *fod = queue->fod;
        struct nvmet_fc_defer_fcp_req *deferfcp, *tempptr;
        unsigned long flags;
-       int i, writedataactive;
+       int i;
        bool disconnect;
 
        disconnect = atomic_xchg(&queue->connected, 0);
                if (fod->active) {
                        spin_lock(&fod->flock);
                        fod->abort = true;
-                       writedataactive = fod->writedataactive;
-                       spin_unlock(&fod->flock);
                        /*
                         * only call lldd abort routine if waiting for
                         * writedata. other outstanding ops should finish
                         * on their own.
                         */
-                       if (writedataactive) {
-                               spin_lock(&fod->flock);
+                       if (fod->writedataactive) {
                                fod->aborted = true;
                                spin_unlock(&fod->flock);
                                tgtport->ops->fcp_abort(
                                        &tgtport->fc_target_port, fod->fcpreq);
-                       }
+                       } else
+                               spin_unlock(&fod->flock);
                }
        }
 
 
        flush_workqueue(queue->work_q);
 
-       if (disconnect)
-               nvmet_sq_destroy(&queue->nvme_sq);
+       nvmet_sq_destroy(&queue->nvme_sq);
 
        nvmet_fc_tgt_q_put(queue);
 }