rx: Fix non-TSFPQ rxi_FreePackets
authorAndrew Deason <adeason@sinenomine.net>
Thu, 8 Nov 2012 00:46:24 +0000 (18:46 -0600)
committerDerrick Brashear <shadow@your-file-system.com>
Thu, 8 Nov 2012 11:59:42 +0000 (03:59 -0800)
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 <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

src/rx/rx_packet.c

index a420c9f..15b0e16 100644 (file)
@@ -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;