Fix scoutfs_treap_next() parent walk comparision

While walking up parents looking for the next node we were comparing the
child with the wrong parent pointer.  This is easily verified by
glancing at rb_next() :).

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2017-01-09 14:31:55 -08:00
parent 80da7fefa7
commit 2522509ec8

View File

@@ -927,7 +927,7 @@ void *scoutfs_treap_next(struct scoutfs_treap *treap, void *data)
goto out;
}
while (((parent = node->parent)) && node == parent->left.node)
while (((parent = node->parent)) && node == parent->right.node)
node = parent;
node = parent;