rculfhash: remove unneeded clear_flag()
authorLai Jiangshan <laijs@cn.fujitsu.com>
Wed, 21 Dec 2011 14:27:47 +0000 (09:27 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 21 Dec 2011 14:27:47 +0000 (09:27 -0500)
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rculfhash.c

index 1eda2dd858981477041fcdcee252c78d224127c2..c1ff314bc0d5cc748e1329d8508f72641ae804ad 100644 (file)
@@ -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
This page took 0.026215 seconds and 4 git commands to generate.