From b4cb483f1a9fd9e1a1c465ab6f5fc44176252d7c Mon Sep 17 00:00:00 2001 From: Lai Jiangshan Date: Thu, 27 Oct 2011 07:07:56 +0200 Subject: [PATCH] Remove dead code in _cds_lfht_gc_bucket() Signed-off-by: Lai Jiangshan Signed-off-by: Mathieu Desnoyers --- rculfhash.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; -- 2.34.1