From feda272217fca3604e904b83845814223b877287 Mon Sep 17 00:00:00 2001 From: Lai Jiangshan Date: Wed, 21 Dec 2011 09:27:47 -0500 Subject: [PATCH] rculfhash: remove unneeded clear_flag() Signed-off-by: Lai Jiangshan Signed-off-by: Mathieu Desnoyers --- rculfhash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rculfhash.c b/rculfhash.c index 1eda2dd..c1ff314 100644 --- a/rculfhash.c +++ b/rculfhash.c @@ -779,9 +779,9 @@ int _cds_lfht_replace(struct cds_lfht *ht, unsigned long size, */ return -ENOENT; } - assert(!is_bucket(old_next)); - assert(new_node != clear_flag(old_next)); - new_node->next = clear_flag(old_next); + assert(old_next == clear_flag(old_next)); + assert(new_node != old_next); + new_node->next = old_next; /* * Here is the whole trick for lock-free replace: we add * the replacement node _after_ the node we want to -- 2.34.1