From cef726558d9ae24a5d3dd00d92550a527f3226df Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Tue, 11 Dec 2012 13:19:02 -0600 Subject: [PATCH] rx: Clarify error checks for busy channel check Commit a84c6b0ece1fdee4f462c6ce27fa78c2e0d419f4 changed this so we don't just discard an incoming request if the call already had an error. But if the call already has an error, rxi_WaitforTQBusy is a no-op, so checking if the error has "changed" is unnecessary and can be confusing. Just bypass this whole block if the call already has an error. Discussed during the 5 Dec 2012 release-team meeting. Change-Id: Id57d65736f3228d4e7595f56800f42c52e83ef39 Reviewed-on: http://gerrit.openafs.org/8748 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear --- src/rx/rx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/rx/rx.c b/src/rx/rx.c index 6d7e78d..0c05763 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -3379,14 +3379,13 @@ rxi_ReceiveServerCall(osi_socket socket, struct rx_packet *np, * flag is cleared. */ #ifdef RX_ENABLE_LOCKS - if (call->state == RX_STATE_ACTIVE) { - int old_error = call->error; + if (call->state == RX_STATE_ACTIVE && !call->error) { rxi_WaitforTQBusy(call); /* If we entered error state while waiting, * must call rxi_CallError to permit rxi_ResetCall * to processed when the tqWaiter count hits zero. */ - if (call->error && call->error != old_error) { + if (call->error) { rxi_CallError(call, call->error); MUTEX_EXIT(&call->lock); return NULL; -- 1.9.4