From: Derrick Brashear Date: Mon, 18 Oct 2004 04:34:30 +0000 (+0000) Subject: STABLE12-attachserverproc-dont-dequeue-if-not-in-queue-take-two-20040818 X-Git-Tag: openafs-stable-1_2_12~23 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=283e64d81c4e114b649779ccb8f804235de86590;p=packages%2Fo%2Fopenafs.git STABLE12-attachserverproc-dont-dequeue-if-not-in-queue-take-two-20040818 nWaiting ended up negative, because the dequeuer (GetCall) decremented. (cherry picked from commit 399785acf166dac15123889c28974ff06d6d2de0) --- diff --git a/src/rx/rx.c b/src/rx/rx.c index cc11cb3d6..369dbbc29 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -3989,11 +3989,12 @@ rxi_AttachServerProc(call, socket, tnop, newcallp) if (call->flags & RX_CALL_WAIT_PROC) { /* Conservative: I don't think this should happen */ call->flags &= ~RX_CALL_WAIT_PROC; - MUTEX_ENTER(&rx_stats_mutex); - rx_nWaiting--; - MUTEX_EXIT(&rx_stats_mutex); - if (queue_IsOnQueue(call)) + if (queue_IsOnQueue(call)) { queue_Remove(call); + MUTEX_ENTER(&rx_stats_mutex); + rx_nWaiting--; + MUTEX_EXIT(&rx_stats_mutex); + } } call->state = RX_STATE_ACTIVE; call->mode = RX_MODE_RECEIVING;