From: Lai Jiangshan Date: Wed, 21 Dec 2011 14:27:47 +0000 (-0500) Subject: rculfhash: remove unneeded clear_flag() X-Git-Tag: v0.7.0~43^2~6 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=feda272217fca3604e904b83845814223b877287;p=urcu.git rculfhash: remove unneeded clear_flag() Signed-off-by: Lai Jiangshan Signed-off-by: Mathieu Desnoyers --- 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