From 580a9a5b84fc4f69087201e3fe7f94a5f97bf75c Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Wed, 27 Apr 2011 15:36:44 -0500 Subject: [PATCH] viced: Do not try to reuse deleted client When h_FindClient_r encounters a deleted client structure, it does not try to find a different client structure to use. Force it to use a new client structure by setting client to NULL when it detects a deleted client. This arguably reverts part of 4e55e30f5b2c149b350b6d6875793adf722fdc21, but the code paths in h_FindClient_r are very different now, so that commit is probably not too relevant. Reviewed-on: http://gerrit.openafs.org/4582 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b2c6a850738437256626e0dfe743a09224879ad4) Change-Id: I5e3a12ee79847a915edeec732946b43270a35697 Reviewed-on: http://gerrit.openafs.org/6296 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- src/viced/host.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/viced/host.c b/src/viced/host.c index 2ae1c8f86..8f6dd4874 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -2386,11 +2386,12 @@ h_FindClient_r(struct rx_connection *tcon) client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key); if (client && client->sid == rxr_CidOf(tcon) && client->VenusEpoch == rxr_GetEpoch(tcon) - && !(client->host->hostFlags & HOSTDELETED)) { + && !(client->host->hostFlags & HOSTDELETED) + && !client->deleted) { client->refCount++; h_Hold_r(client->host); - if (!client->deleted && client->prfail != 2) { + if (client->prfail != 2) { /* Could add shared lock on client here */ /* note that we don't have to lock entry in this path to * ensure CPS is initialized, since we don't call rx_SetSpecific -- 2.39.5