afs: Drop GLOCK for RXAFS_GetCapabilities

We are hitting the net here; we certainly should not be holding
AFS_GLOCK while waiting for the server's response.

Found via FreeBSD WITNESS.

Change-Id: Ie727db27adaeed23ac8cff7665143bae2ce2ede8
Reviewed-on: https://gerrit.openafs.org/14181
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
Andrew Deason 2020-05-02 23:54:55 -05:00 committed by Benjamin Kaduk
parent 5d53ed0bda
commit 44b7b93b59

View File

@ -1520,7 +1520,9 @@ afs_GetCapabilities(struct server *ts)
} }
/* InitCallBackStateN, triggered by our RPC, may need this */ /* InitCallBackStateN, triggered by our RPC, may need this */
ReleaseWriteLock(&afs_xserver); ReleaseWriteLock(&afs_xserver);
AFS_GUNLOCK();
code = RXAFS_GetCapabilities(rxconn, &caps); code = RXAFS_GetCapabilities(rxconn, &caps);
AFS_GLOCK();
ObtainWriteLock(&afs_xserver, 723); ObtainWriteLock(&afs_xserver, 723);
/* we forced a conn above; important we mark it down if needed */ /* we forced a conn above; important we mark it down if needed */
if ((code < 0) && (code != RXGEN_OPCODE)) { if ((code < 0) && (code != RXGEN_OPCODE)) {