From: Derrick Brashear Date: Sat, 15 Feb 2003 06:03:25 +0000 (+0000) Subject: viced-client-set-refcount-before-chaining-into-host-20030215 X-Git-Tag: openafs-devel-1_3_50~368 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=825e7d57e7b818aea1904de0ab200de422b45f69;p=packages%2Fo%2Fopenafs.git viced-client-set-refcount-before-chaining-into-host-20030215 didn't find a race but it's safer this way if there's one i missed --- diff --git a/src/viced/host.c b/src/viced/host.c index b349a2d90..89cde4fa7 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -495,8 +495,8 @@ h_gethostcps_r(register struct host *host, register afs_int32 now) } } -void h_flushhostcps(hostaddr, hport) - register afs_uint32 hostaddr, hport; /* net byte order */ +/* args in net byte order */ +void h_flushhostcps(register afs_uint32 hostaddr, register afs_uint32 hport) { register struct host *host; int held; @@ -510,7 +510,7 @@ void h_flushhostcps(hostaddr, hport) h_Release_r(host); H_UNLOCK -return; + return; } @@ -1369,6 +1369,7 @@ ticket name length != 64 if (!client) { client = GetCE(); ObtainWriteLock(&client->lock); + client->refCount = 1; client->host = host; client->next = host->FirstClient; host->FirstClient = client; @@ -1382,7 +1383,6 @@ ticket name length != 64 client->VenusEpoch = rxr_GetEpoch(tcon); client->CPS.prlist_val = 0; client->CPS.prlist_len = 0; - client->refCount = 1; CurrentConnections++; /* increment number of connections */ } }