mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
Windows: cm_ConnByServer fix search for replication
Separate connection objects are maintained for use when accessing replicated and single source volumes. If the matching connection type cannot be found while holding the cm_connLock shared a second search is performed after the lock is upgraded to an exclusive lock. This second connection search was not enforcing the replication criteria. Change-Id: I408a5d87c3a82da5235fa2255db7d1d7a6bcb6d9 Reviewed-on: http://gerrit.openafs.org/10681 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
parent
cccb5e6142
commit
6995a56884
@ -1669,7 +1669,9 @@ long cm_ConnByServer(cm_server_t *serverp, cm_user_t *userp, afs_uint32 replicat
|
|||||||
if (!tcp) {
|
if (!tcp) {
|
||||||
lock_ConvertRToW(&cm_connLock);
|
lock_ConvertRToW(&cm_connLock);
|
||||||
for (tcp = serverp->connsp; tcp; tcp=tcp->nextp) {
|
for (tcp = serverp->connsp; tcp; tcp=tcp->nextp) {
|
||||||
if (tcp->userp == userp)
|
if (tcp->userp == userp &&
|
||||||
|
(replicated && (tcp->flags & CM_CONN_FLAG_REPLICATION) ||
|
||||||
|
!replicated && !(tcp->flags & CM_CONN_FLAG_REPLICATION)))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (tcp) {
|
if (tcp) {
|
||||||
|
Loading…
Reference in New Issue
Block a user