projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rculfhash: reinstate i - 1 for shrink
[urcu.git]
/
rculfhash.c
diff --git
a/rculfhash.c
b/rculfhash.c
index f6c901bb0d4f242ecfa5b8bce0077313bee56f54..0b3996416c270072b069fe700764515165bc50b5 100644
(file)
--- a/
rculfhash.c
+++ b/
rculfhash.c
@@
-672,6
+672,13
@@
void _cds_lfht_gc_bucket(struct cds_lfht_node *dummy, struct cds_lfht_node *node
/* We can always skip the dummy node initially */
iter = rcu_dereference(iter_prev->p.next);
assert(iter_prev->p.reverse_hash <= node->p.reverse_hash);
/* We can always skip the dummy node initially */
iter = rcu_dereference(iter_prev->p.next);
assert(iter_prev->p.reverse_hash <= node->p.reverse_hash);
+ /*
+ * We should never be called with dummy (start of chain)
+ * and logically removed node (end of path compression
+ * marker) being the actual same node. This would be a
+ * bug in the algorithm implementation.
+ */
+ assert(dummy != node);
for (;;) {
if (unlikely(!clear_flag(iter)))
return;
for (;;) {
if (unlikely(!clear_flag(iter)))
return;
@@
-895,7
+902,7
@@
void fini_table(struct cds_lfht *ht, struct rcu_table *t,
* removal so gc lookups use non-logically-removed dummy
* nodes.
*/
* removal so gc lookups use non-logically-removed dummy
* nodes.
*/
- t->size = 1UL << (i -
2
);
+ t->size = 1UL << (i -
1
);
/* Unlink */
for (j = 0; j < len; j++) {
struct cds_lfht_node *fini_node =
/* Unlink */
for (j = 0; j < len; j++) {
struct cds_lfht_node *fini_node =
This page took
0.023129 seconds
and
4
git commands to generate.