From: Andrew Deason Date: Tue, 11 Dec 2012 19:19:02 +0000 (-0600) Subject: rx: Clarify error checks for busy channel check X-Git-Tag: upstream/1.8.0_pre1^2~851 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=cef726558d9ae24a5d3dd00d92550a527f3226df;p=packages%2Fo%2Fopenafs.git 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 --- diff --git a/src/rx/rx.c b/src/rx/rx.c index 6d7e78dc6..0c0576375 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;