mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
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. Change-Id: Ie44a45734ab25bd3d2be3635c2e8f05857ca935e 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>
This commit is contained in:
parent
20151a8699
commit
6ad3d646e6
@ -2006,7 +2006,7 @@ rx_GetCall(int tno, struct rx_service *cur_service, osi_socket * socketp)
|
||||
}
|
||||
MUTEX_ENTER(&rx_pthread_mutex);
|
||||
if (tno == rxi_fcfs_thread_num
|
||||
|| !tcall->queue_item_header.next) {
|
||||
|| queue_IsLast(&rx_incomingCallQueue, tcall)) {
|
||||
MUTEX_EXIT(&rx_pthread_mutex);
|
||||
/* If we're the fcfs thread , then we'll just use
|
||||
* this call. If we haven't been able to find an optimal
|
||||
|
Loading…
x
Reference in New Issue
Block a user