mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
Windows: cm_ConnByServer hold userp->mx only while necessary
The cm_userp_t does not need to be locked while the cm_conn_t force new connection processing is taking place. Change-Id: Ia3711d393d60382b18f7e45621561d2015b97af7 Reviewed-on: http://gerrit.openafs.org/7718 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com> Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
parent
c3ce54e6b7
commit
5b9e9265a0
@ -1594,9 +1594,11 @@ long cm_ConnByServer(cm_server_t *serverp, cm_user_t *userp, afs_uint32 replicat
|
||||
tcp->nextp = serverp->connsp;
|
||||
serverp->connsp = tcp;
|
||||
lock_ReleaseWrite(&cm_connLock);
|
||||
lock_ReleaseMutex(&userp->mx);
|
||||
} else {
|
||||
lock_ReleaseRead(&cm_connLock);
|
||||
haveconn:
|
||||
lock_ReleaseMutex(&userp->mx);
|
||||
InterlockedIncrement(&tcp->refCount);
|
||||
|
||||
lock_ObtainMutex(&tcp->mx);
|
||||
@ -1608,14 +1610,13 @@ long cm_ConnByServer(cm_server_t *serverp, cm_user_t *userp, afs_uint32 replicat
|
||||
osi_Log0(afsd_logp, "cm_ConnByServer replace connection due to token update");
|
||||
else
|
||||
osi_Log0(afsd_logp, "cm_ConnByServer replace connection due to crypt change");
|
||||
tcp->flags &= ~CM_CONN_FLAG_FORCE_NEW;
|
||||
tcp->flags &= ~CM_CONN_FLAG_FORCE_NEW;
|
||||
rx_SetConnSecondsUntilNatPing(tcp->rxconnp, 0);
|
||||
rx_DestroyConnection(tcp->rxconnp);
|
||||
cm_NewRXConnection(tcp, ucellp, serverp, replicated);
|
||||
}
|
||||
lock_ReleaseMutex(&tcp->mx);
|
||||
}
|
||||
lock_ReleaseMutex(&userp->mx);
|
||||
|
||||
/* return this pointer to our caller */
|
||||
osi_Log1(afsd_logp, "cm_ConnByServer returning conn 0x%p", tcp);
|
||||
|
Loading…
Reference in New Issue
Block a user