In h_FindClient_r, we can change which client structure we're dealing
with if we find a different client struct in the Rx conn-specific
data. We adjust the refcounts for the client structures themselves,
but not the associated hosts. While the host structures should be the
same most of the time, we are not guaranteed that, so adjust their
refcounts as well.
Reviewed-on: http://gerrit.openafs.org/4580
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit
9a4e3ade396583d412a85c4e03238d18d5c533ee)
Change-Id: I9ec5ed707ef6b726c358fcaa46d81b9ea1a17ce7
Reviewed-on: http://gerrit.openafs.org/4591
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
created = 0;
}
oldClient->refCount++;
+
+ h_Hold_r(oldClient->host);
+ h_Release_r(client->host);
+
H_UNLOCK;
ObtainWriteLock(&oldClient->lock);
H_LOCK;
client = oldClient;
+ host = oldClient->host;
} else {
ViceLog(0, ("FindClient: deleted client %p(%x) already had "
"conn %p (host %s:%d), stolen by client %p(%x)\n",