From 732a4c52d5e4836d8219dd03c2e9e17e89e395a5 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Thu, 4 Nov 2010 12:07:17 -0500 Subject: [PATCH] RX: Fix old rx_stats incrementors A couple of places were still trying to increment rx_stats members by just ++'ing them. Update them to use rx_atomic_inc. Change-Id: I35f5b24a08952d308074851623b06580e4b2b93b Reviewed-on: http://gerrit.openafs.org/3263 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/rx/rx_kcommon.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/rx/rx_kcommon.c b/src/rx/rx_kcommon.c index 135149581e..c63b8b3e21 100644 --- a/src/rx/rx_kcommon.c +++ b/src/rx/rx_kcommon.c @@ -304,9 +304,7 @@ MyPacketProc(struct rx_packet **ahandle, int asize) rxi_FreePacket(tp); tp = NULL; if (rx_stats_active) { - MUTEX_ENTER(&rx_stats_mutex); - rx_stats.noPacketBuffersOnRead++; - MUTEX_EXIT(&rx_stats_mutex); + rx_atomic_inc(&rx_stats.noPacketBuffersOnRead); } } } @@ -317,9 +315,7 @@ MyPacketProc(struct rx_packet **ahandle, int asize) * end know we're losing. */ if (rx_stats_active) { - MUTEX_ENTER(&rx_stats_mutex); - rx_stats.bogusPacketOnRead++; - MUTEX_EXIT(&rx_stats_mutex); + rx_atomic_inc(&rx_stats.bogusPacketOnRead); } /* I DON"T LIKE THIS PRINTF -- PRINTFS MAKE THINGS VERY VERY SLOOWWW */ dpf(("rx: packet dropped: bad ulen=%d\n", asize));