Windows: do not drop lock unnecessarily

do not drop cm_serverLock for a cm_PutServer call since
it will only reacquire it.  use cm_PutServerNoLock() instead.

Change-Id: I0e22f8d547a8fa0067cfc918f578b8fe11cc781a
Reviewed-on: http://gerrit.openafs.org/5302
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
Jeffrey Altman 2011-08-21 00:37:34 -04:00 committed by Jeffrey Altman
parent bca64c7046
commit b804e027f1

View File

@ -3268,7 +3268,6 @@ cm_CheckServersStatus(cm_serverRef_t *serversp)
continue;
if (tsp = tsrp->server) {
cm_GetServerNoLock(tsp);
lock_ReleaseRead(&cm_serverLock);
if (!(tsp->flags & CM_SERVERFLAG_DOWN)) {
allDown = 0;
if (tsrp->status == srv_busy) {
@ -3280,11 +3279,10 @@ cm_CheckServersStatus(cm_serverRef_t *serversp)
} else {
allOffline = 0;
allBusy = 0;
cm_PutServer(tsp);
cm_PutServerNoLock(tsp);
goto done;
}
}
lock_ObtainRead(&cm_serverLock);
cm_PutServerNoLock(tsp);
}
}