From 00a0351ae0b0850f0191d5df2d9478fbc8e4f30a Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Thu, 1 Apr 2010 21:33:49 -0400 Subject: [PATCH] rx_ClearTransmitQueue should signal waiters when flushing if we flush, play it safe and signal tq waiters. Change-Id: I945649c2e440c78c5c5a62da70236a67dc190228 Reviewed-on: http://gerrit.openafs.org/1682 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear --- src/rx/rx.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/rx/rx.c b/src/rx/rx.c index bf879fecd5..70a1eb44a9 100755 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -4464,6 +4464,13 @@ rxi_ClearTransmitQueue(struct rx_call *call, int force) call->tqc -= #endif /* RXDEBUG_PACKET */ rxi_FreePackets(0, &call->tq); + if (call->tqWaiters || (call->flags & RX_CALL_TQ_WAIT)) { +#ifdef RX_ENABLE_LOCKS + CV_BROADCAST(&call->cv_tq); +#else /* RX_ENABLE_LOCKS */ + osi_rxWakeup(&call->tq); +#endif /* RX_ENABLE_LOCKS */ + } #ifdef AFS_GLOBAL_RXLOCK_KERNEL call->flags &= ~RX_CALL_TQ_CLEARME; } @@ -4739,14 +4746,6 @@ rxi_ResetCall(struct rx_call *call, int newcall) dpf(("rcall %"AFS_PTR_FMT" has %d waiters and flags %d\n", call, call->tqWaiters, call->flags)); } call->flags = 0; - while (call->tqWaiters) { -#ifdef RX_ENABLE_LOCKS - CV_BROADCAST(&call->cv_tq); -#else /* RX_ENABLE_LOCKS */ - osi_rxWakeup(&call->tq); -#endif /* RX_ENABLE_LOCKS */ - call->tqWaiters--; - } } rxi_ClearReceiveQueue(call);