From: Derrick Brashear Date: Mon, 11 Oct 2004 19:39:55 +0000 (+0000) Subject: viced-callback-lock-host-during-multi-breakcallback-20041011 X-Git-Tag: BP-disconnected~221 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=d98a0af85d857f74ba8c50ae85f397a526822cb8 viced-callback-lock-host-during-multi-breakcallback-20041011 since it looks like CheckHost is using a gc'd client conn, this more or less has to be it. ==================== This delta was composed from multiple commits as part of the CVS->Git migration. The checkin message with each commit was inconsistent. The following are the additional commit messages. ==================== since it looks like CheckHost is using a gc'd client conn, this more or less has to be it. and don't deadlock. ==================== since it looks like CheckHost is using a gc'd client conn, this more or less has to be it. and don't deadlock. ==================== since it looks like CheckHost is using a gc'd client conn, this more or less has to be it. and don't deadlock. --- diff --git a/src/viced/callback.c b/src/viced/callback.c index 65e3be2..90d684d 100644 --- a/src/viced/callback.c +++ b/src/viced/callback.c @@ -776,6 +776,7 @@ MultiBreakCallBack_r(struct cbstruct cba[], int ncbas, if (!thishost || (thishost->hostFlags & HOSTDELETED)) { continue; } + rx_GetConnection(thishost->callback_rxcon); conns[j++] = thishost->callback_rxcon; #ifdef ADAPT_MTU @@ -832,14 +833,14 @@ MultiBreakCallBack_r(struct cbstruct cba[], int ncbas, } H_LOCK; - h_Lock_r(hp); + h_Lock_r(hp); hp->hostFlags |= VENUSDOWN; /** * We always go into AddCallBack1_r with the host locked */ AddCallBack1_r(hp, afidp->AFSCBFids_val, itot(idx), CB_DELAYED, 1); - h_Unlock_r(hp); + h_Unlock_r(hp); H_UNLOCK; } } @@ -853,8 +854,10 @@ MultiBreakCallBack_r(struct cbstruct cba[], int ncbas, for (i = 0; i < ncbas; i++) { struct host *hp; hp = cba[i].hp; - if (hp && xhost != hp) + if (hp && xhost != hp) { + rx_PutConnection(hp->callback_rxcon); h_Release_r(hp); + } } return;