- cfs_spin_lock(&obd->obd_recovery_task_lock);
- if (obd->obd_recovering) {
- cfs_list_add_tail(&req->rq_list,
- &obd->obd_final_req_queue);
- } else {
- cfs_spin_unlock(&obd->obd_recovery_task_lock);
- target_request_copy_put(req);
- RETURN(obd->obd_stopping ? -ENOTCONN : 1);
- }
- cfs_spin_unlock(&obd->obd_recovery_task_lock);
- RETURN(0);
- }
- if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_REQ_REPLAY_DONE) {
- /* client declares he's ready to replay locks */
- target_request_copy_get(req);
- DEBUG_REQ(D_HA, req, "queue lock replay req");
- cfs_waitq_signal(&obd->obd_next_transno_waitq);
- cfs_spin_lock(&obd->obd_recovery_task_lock);
- LASSERT(obd->obd_recovering);
- /* usually due to recovery abort */
- if (!req->rq_export->exp_in_recovery) {
- cfs_spin_unlock(&obd->obd_recovery_task_lock);
- target_request_copy_put(req);
- RETURN(-ENOTCONN);
- }
- LASSERT(req->rq_export->exp_lock_replay_needed);
- cfs_list_add_tail(&req->rq_list, &obd->obd_lock_replay_queue);
- cfs_spin_unlock(&obd->obd_recovery_task_lock);
- RETURN(0);
- }
+ spin_lock(&obd->obd_recovery_task_lock);
+ if (obd->obd_recovering) {
+ cfs_list_add_tail(&req->rq_list,
+ &obd->obd_final_req_queue);
+ } else {
+ spin_unlock(&obd->obd_recovery_task_lock);
+ target_request_copy_put(req);
+ RETURN(obd->obd_stopping ? -ENOTCONN : 1);
+ }
+ spin_unlock(&obd->obd_recovery_task_lock);
+ RETURN(0);
+ }
+ if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_REQ_REPLAY_DONE) {
+ /* client declares he's ready to replay locks */
+ target_request_copy_get(req);
+ DEBUG_REQ(D_HA, req, "queue lock replay req");
+ cfs_waitq_signal(&obd->obd_next_transno_waitq);
+ spin_lock(&obd->obd_recovery_task_lock);
+ LASSERT(obd->obd_recovering);
+ /* usually due to recovery abort */
+ if (!req->rq_export->exp_in_recovery) {
+ spin_unlock(&obd->obd_recovery_task_lock);
+ target_request_copy_put(req);
+ RETURN(-ENOTCONN);
+ }
+ LASSERT(req->rq_export->exp_lock_replay_needed);
+ cfs_list_add_tail(&req->rq_list, &obd->obd_lock_replay_queue);
+ spin_unlock(&obd->obd_recovery_task_lock);
+ RETURN(0);
+ }