mirror of
https://github.com/qemu/qemu.git
synced 2024-11-27 22:03:35 +08:00
tests: Fix a bug with count variables
The counting code here should use the local variable n_nodes_local. Otherwise, the variable n_nodes is counting incorrectly, causing the counting logic of the code to be wrong. Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Link: https://lore.kernel.org/r/20200207115433.118254-1-tianjia.zhang@linux.alibaba.com Message-Id: <20200207115433.118254-1-tianjia.zhang@linux.alibaba.com>
This commit is contained in:
parent
3fc92f8752
commit
1f40ace7b5
@ -235,7 +235,7 @@ static void *rcu_q_updater(void *arg)
|
||||
j++;
|
||||
if (target_el == j) {
|
||||
struct list_element *new_el = g_new(struct list_element, 1);
|
||||
n_nodes += n_nodes_local;
|
||||
n_nodes_local++;
|
||||
TEST_LIST_INSERT_AFTER_RCU(el, new_el, entry);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user