From: Lai Jiangshan Date: Thu, 27 Oct 2011 05:07:56 +0000 (+0200) Subject: Remove dead code in _cds_lfht_gc_bucket() X-Git-Tag: v0.7.0~43^2~85 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b4cb483f1a9fd9e1a1c465ab6f5fc44176252d7c;p=urcu.git Remove dead code in _cds_lfht_gc_bucket() Signed-off-by: Lai Jiangshan Signed-off-by: Mathieu Desnoyers --- diff --git a/rculfhash.c b/rculfhash.c index b9c184f..a7e751b 100644 --- a/rculfhash.c +++ b/rculfhash.c @@ -748,6 +748,7 @@ void _cds_lfht_gc_bucket(struct cds_lfht_node *dummy, struct cds_lfht_node *node iter_prev = dummy; /* We can always skip the dummy node initially */ iter = rcu_dereference(iter_prev->p.next); + assert(!is_removed(iter)); assert(iter_prev->p.reverse_hash <= node->p.reverse_hash); /* * We should never be called with dummy (start of chain) @@ -772,8 +773,6 @@ void _cds_lfht_gc_bucket(struct cds_lfht_node *dummy, struct cds_lfht_node *node new_next = flag_dummy(clear_flag(next)); else new_next = clear_flag(next); - if (is_removed(iter)) - new_next = flag_removed(new_next); (void) uatomic_cmpxchg(&iter_prev->p.next, iter, new_next); } return;