From: Andrew Deason Date: Thu, 8 Nov 2012 00:46:24 +0000 (-0600) Subject: rx: Fix non-TSFPQ rxi_FreePackets X-Git-Tag: upstream/1.8.0_pre1^2~1835 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=bbea7b07f3f2120245026a632b4109d9d7b1359f;p=packages%2Fo%2Fopenafs.git rx: Fix non-TSFPQ rxi_FreePackets Actually count the number of packets we're given, so we don't bail out early because num_pkts is 0. Without this, we effectively do not free most packets for non-pthreads Rx, so e.g. the unix kernel module will leak memory quite quickly and be very slow. This was introduced by 170dbb3c. Change-Id: Id781e37170683c422b40079fdda018be1caddaf3 Reviewed-on: http://gerrit.openafs.org/8401 Tested-by: Andrew Deason Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear --- diff --git a/src/rx/rx_packet.c b/src/rx/rx_packet.c index a420c9f81..15b0e1606 100644 --- a/src/rx/rx_packet.c +++ b/src/rx/rx_packet.c @@ -427,6 +427,7 @@ rxi_FreePackets(int num_pkts, struct opr_queue *q) qlen += rxi_FreeDataBufsToQueue(p, 2, &cbs); } RX_FPQ_MARK_FREE(p); + num_pkts++; } if (!num_pkts) return 0;