req->rq_peer.nid != export->exp_connection->c_peer.nid) {
/* make darn sure this is coming from the same peer
* if the UUIDs matched */
- CWARN("%s: cookie %s seen on new NID %s when "
- "existing NID %s is already connected\n",
- target->obd_name, cluuid.uuid,
- libcfs_nid2str(req->rq_peer.nid),
- libcfs_nid2str(export->exp_connection->c_peer.nid));
- class_export_put(export);
- export = NULL;
- rc = -EALREADY;
+ CWARN("%s: cookie %s seen on new NID %s when "
+ "existing NID %s is already connected\n",
+ target->obd_name, cluuid.uuid,
+ libcfs_nid2str(req->rq_peer.nid),
+ libcfs_nid2str(export->exp_connection->c_peer.nid));
+ class_export_put(export);
+ export = NULL;
+ rc = -EALREADY;
} else if (export != NULL && export->exp_failed) { /* bug 11327 */
CDEBUG(D_HA, "%s: exp %p evict in progress - new cookie needed "
"for connect\n", export->exp_obd->obd_name, export);
rc = -ENODEV;
} else if (export != NULL && export->exp_delayed &&
!(data && data->ocd_connect_flags & OBD_CONNECT_VBR)) {
+ spin_unlock(&target->obd_dev_lock);
class_fail_export(export);
class_export_put(export);
export = NULL;
- rc = -ENODEV;
+ GOTO(out, rc = -ENODEV);
} else if (export != NULL) {
spin_lock(&export->exp_lock);
export->exp_connecting = 1;
spin_lock_bh(&obd->obd_processing_task_lock);
/* VBR: no clients are remained to replay, stop recovery */
- if (obd->obd_recovering &&
- obd->obd_recoverable_clients == 0)
+ if (obd->obd_recovering && obd->obd_recoverable_clients == 0)
obd->obd_abort_recovery = 1;
/* always check versions now */
obd->obd_version_recov = 1;
spin_lock(&obd->obd_dev_lock);
list_add_tail(&exp->exp_obd_chain_timed,
&obd->obd_exports_timed);
+ list_move_tail(&exp->exp_obd_chain, &obd->obd_exports);
spin_unlock(&obd->obd_dev_lock);
target_send_delayed_replies(obd);
}