rx: Correctly test for end of call queue
authorMarc Dionne <marc.c.dionne@gmail.com>
Wed, 18 Jan 2012 01:19:54 +0000 (20:19 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 3 Feb 2012 18:44:58 +0000 (10:44 -0800)
commit16a8136337a0fedb6c1884c954fc6a6a40cb623c
tree4f4e7712f812191f2d1e1bd633be813137865788
parentfb0087fbcc0144db6b7ab0f06cd649890a996e22
rx: Correctly test for end of call queue

The intention of this condition is to check if the current call
being considered is the last one on the queue, but the test is
incorrect.  A null next pointer indicates a removed item, not
the end of the queue.

Use the queue_IsLast macro instead to correctly determine that
this is the last item in the queue and that a call has to be
selected, either the current one or a previously seen good choice.

This can cause calls to get permanently stuck in the call queue
and never get assigned to a thread, even when all threads are
idle.

Reviewed-on: http://gerrit.openafs.org/6564
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 6ad3d646e62801cb81a3c9efeac320daa44936e1)

Reviewed-on: http://gerrit.openafs.org/6570
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 339438c8473110bebdd31b23706e2e387560723f)

Change-Id: I86e43066ab20dc64749be2c2ba0fffa511e7f9ff
Reviewed-on: http://gerrit.openafs.org/6623
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
src/rx/rx.c