LASSERT(exp != NULL);
if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_REQ_REPLAY_DONE) {
/* client declares he's ready to replay locks */
+ cfs_spin_lock(&exp->exp_lock);
if (exp->exp_req_replay_needed) {
- LASSERT(cfs_atomic_read(&obd->obd_req_replay_clients) >
- 0);
- cfs_spin_lock(&exp->exp_lock);
exp->exp_req_replay_needed = 0;
cfs_spin_unlock(&exp->exp_lock);
+ LASSERT(cfs_atomic_read(&obd->obd_req_replay_clients));
cfs_atomic_dec(&obd->obd_req_replay_clients);
+ } else {
+ cfs_spin_unlock(&exp->exp_lock);
}
}
if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_LOCK_REPLAY_DONE) {
/* client declares he's ready to complete recovery
* so, we put the request on th final queue */
+ cfs_spin_lock(&exp->exp_lock);
if (exp->exp_lock_replay_needed) {
- LASSERT(cfs_atomic_read(&obd->obd_lock_replay_clients) >
- 0);
- cfs_spin_lock(&exp->exp_lock);
exp->exp_lock_replay_needed = 0;
cfs_spin_unlock(&exp->exp_lock);
+ LASSERT(cfs_atomic_read(&obd->obd_lock_replay_clients));
cfs_atomic_dec(&obd->obd_lock_replay_clients);
+ } else {
+ cfs_spin_unlock(&exp->exp_lock);
}
}
return 0;