From e3a50ea0d314df4e8caf0e25c57042a5f2a6e008 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 12 Jan 2012 09:31:43 -0500 Subject: [PATCH] Rx: give grow mtu its own call ref count type Change-Id: Ibf62408203d615ff87454a9ecb50c38b6db6d45a Reviewed-on: http://gerrit.openafs.org/6543 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot --- src/rx/rx.c | 8 ++++---- src/rx/rx_call.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/rx/rx.c b/src/rx/rx.c index a832c21..14d5186 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -5225,7 +5225,7 @@ rxi_ResetCall(struct rx_call *call, int newcall) } - rxevent_Cancel(&call->growMTUEvent, call, RX_CALL_REFCOUNT_ALIVE); + rxevent_Cancel(&call->growMTUEvent, call, RX_CALL_REFCOUNT_MTU); if (call->delayedAbortEvent) { rxevent_Cancel(&call->delayedAbortEvent, call, RX_CALL_REFCOUNT_ABORT); @@ -6251,7 +6251,7 @@ rxi_CheckCall(struct rx_call *call) rxevent_Cancel(&call->keepAliveEvent, call, RX_CALL_REFCOUNT_ALIVE); rxevent_Cancel(&call->growMTUEvent, call, - RX_CALL_REFCOUNT_ALIVE); + RX_CALL_REFCOUNT_MTU); MUTEX_ENTER(&rx_refcnt_mutex); /* if rxi_FreeCall returns 1 it has freed the call */ if (call->refCount == 0 && @@ -6499,7 +6499,7 @@ rxi_GrowMTUEvent(struct rxevent *event, void *arg1, void *dummy, int dummy2) struct rx_call *call = arg1; struct rx_connection *conn; - CALL_RELE(call, RX_CALL_REFCOUNT_ALIVE); + CALL_RELE(call, RX_CALL_REFCOUNT_MTU); MUTEX_ENTER(&call->lock); if (event == call->growMTUEvent) { @@ -6568,7 +6568,7 @@ rxi_ScheduleGrowMTUEvent(struct rx_call *call, int secs) } when.sec += secs; - CALL_HOLD(call, RX_CALL_REFCOUNT_ALIVE); + CALL_HOLD(call, RX_CALL_REFCOUNT_MTU); call->growMTUEvent = rxevent_Post(&when, &now, rxi_GrowMTUEvent, call, NULL, 0); } diff --git a/src/rx/rx_call.h b/src/rx/rx_call.h index 0073227..ce52f18 100644 --- a/src/rx/rx_call.h +++ b/src/rx/rx_call.h @@ -120,7 +120,8 @@ struct rx_call { #define RX_CALL_REFCOUNT_SEND 5 /* rxi_Send */ #define RX_CALL_REFCOUNT_ACKALL 6 /* rxi_AckAll */ #define RX_CALL_REFCOUNT_ABORT 7 /* delayed abort */ -#define RX_CALL_REFCOUNT_MAX 8 /* array size. */ +#define RX_CALL_REFCOUNT_MTU 8 /* grow mtu event */ +#define RX_CALL_REFCOUNT_MAX 9 /* array size. */ #ifdef RX_REFCOUNT_CHECK short refCDebug[RX_CALL_REFCOUNT_MAX]; #endif /* RX_REFCOUNT_CHECK */ -- 1.9.4