Windows: cm_serverLock read required not write

Change-Id: I9e804ddd7de824b2f5ce880e52c08bff6b0615e7
Reviewed-on: http://gerrit.openafs.org/5301
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:36:44 -04:00 committed by Jeffrey Altman
parent b2c1313f2f
commit bca64c7046

View File

@ -2070,15 +2070,15 @@ cm_GiveUpAllCallbacksAllServers(afs_int32 markDown)
if (!cm_giveUpAllCBs)
return;
lock_ObtainWrite(&cm_serverLock);
lock_ObtainRead(&cm_serverLock);
for (tsp = cm_allServersp; tsp; tsp = tsp->allNextp) {
cm_GetServerNoLock(tsp);
lock_ReleaseWrite(&cm_serverLock);
lock_ReleaseRead(&cm_serverLock);
cm_GiveUpAllCallbacks(tsp, markDown);
lock_ObtainWrite(&cm_serverLock);
lock_ObtainRead(&cm_serverLock);
cm_PutServerNoLock(tsp);
}
lock_ReleaseWrite(&cm_serverLock);
lock_ReleaseRead(&cm_serverLock);
}
void