[ltt-dev] [PATCH 01/11] Fix dummy node insertion bug

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Mon Oct 17 10:30:55 EDT 2011


* Lai Jiangshan (laijs at cn.fujitsu.com) wrote:
> dummy node is the first node of the identical-hash-value chain
> 
> Signed-off-by: Lai Jiangshan <laijs at cn.fujitsu.com>

merged, thanks!

Mathieu

> ---
>  rculfhash.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/rculfhash.c b/rculfhash.c
> index 3ded228..d7a4df3 100644
> --- a/rculfhash.c
> +++ b/rculfhash.c
> @@ -875,6 +875,9 @@ struct cds_lfht_node *_cds_lfht_add(struct cds_lfht *ht,
>  				goto insert;
>  			if (likely(clear_flag(iter)->p.reverse_hash > node->p.reverse_hash))
>  				goto insert;
> +			/* dummy node is the first node of the identical-hash-value chain */
> +			if (dummy && clear_flag(iter)->p.reverse_hash == node->p.reverse_hash)
> +				goto insert;
>  			next = rcu_dereference(clear_flag(iter)->p.next);
>  			if (unlikely(is_removed(next)))
>  				goto gc_node;
> -- 
> 1.7.4.4
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




More information about the lttng-dev mailing list