From: Derrick Brashear Date: Wed, 10 Oct 2001 15:00:54 +0000 (+0000) Subject: h-release-r-should-try-harder-to-reap-deleted-hosts-20011008 X-Git-Tag: openafs-devel-1_3_0~220 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=72d9dc774197b2cc0397fd8ee7dfd4b84d54d843 h-release-r-should-try-harder-to-reap-deleted-hosts-20011008 based on complaint from and work with jimmy@e.kth.se h_OtherHolds_r will never return 0 if we mask our own hold bit before calling it. however we must be careful to mask before h_TossStuff_r so we aren't still "holding" then otherwise just release our hold ==================== 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. ==================== mask holdbit in case i missed --- diff --git a/src/viced/host.c b/src/viced/host.c index 79d3fe3..31c044d 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -270,14 +270,20 @@ int h_Release_r(host) register struct host *host; { - if (!((host)->holds[h_holdSlot()] &= ~h_holdbit()) ) { + if (!((host)->holds[h_holdSlot()] & ~h_holdbit()) ) { if (! h_OtherHolds_r(host) ) { + /* must avoid masking this until after h_OtherHolds_r runs + but it should be run before h_TossStuff_r */ + (host)->holds[h_holdSlot()] &= ~h_holdbit(); if ( (host->hostFlags & HOSTDELETED) || (host->hostFlags & CLIENTDELETED) ) { h_TossStuff_r(host); } - } - } + } else + (host)->holds[h_holdSlot()] &= ~h_holdbit(); + } else + (host)->holds[h_holdSlot()] &= ~h_holdbit(); + return 0; }