rx: clear call_queue_lock after removing call from queue
[openafs.git] / src / rx / rx.c
index b12d759..087b62d 100644 (file)
@@ -2101,6 +2101,7 @@ rx_GetCall(int tno, struct rx_service *cur_service, osi_socket * socketp)
            opr_queue_Remove(&call->entry);
            MUTEX_EXIT(&rx_serverPool_lock);
            MUTEX_ENTER(&call->lock);
+           CLEAR_CALL_QUEUE_LOCK(call);
 
            if (call->flags & RX_CALL_WAIT_PROC) {
                call->flags &= ~RX_CALL_WAIT_PROC;
@@ -2119,7 +2120,6 @@ rx_GetCall(int tno, struct rx_service *cur_service, osi_socket * socketp)
                || opr_queue_First(&call->rq, struct rx_packet, entry)->header.seq != 1)
                rxi_SendAck(call, 0, 0, RX_ACK_DELAY, 0);
 
-           CLEAR_CALL_QUEUE_LOCK(call);
            break;
        } else {
            /* If there are no eligible incoming calls, add this process
@@ -4957,6 +4957,7 @@ rxi_AttachServerProc(struct rx_call *call,
            if (opr_queue_IsOnQueue(&call->entry)) {
                opr_queue_Remove(&call->entry);
            }
+           CLEAR_CALL_QUEUE_LOCK(call);
        }
        call->state = RX_STATE_ACTIVE;
        call->app.mode = RX_MODE_RECEIVING;