[ltt-dev] [PATCH 08/11] remove dead code in _cds_lfht_gc_bucket()

Lai Jiangshan laijs at cn.fujitsu.com
Fri Oct 14 11:04:38 EDT 2011


Signed-off-by: Lai Jiangshan <laijs at cn.fujitsu.com>
---
 rculfhash.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/rculfhash.c b/rculfhash.c
index 1ccab8e..694cb99 100644
--- a/rculfhash.c
+++ b/rculfhash.c
@@ -747,6 +747,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)
@@ -771,8 +772,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;
-- 
1.7.4.4





More information about the lttng-dev mailing list