The revision element must of been part of an earlier design, because
currently it is set but never used.
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
struct trie_use_stats stats;
#endif
int size;
struct trie_use_stats stats;
#endif
int size;
};
static void put_child(struct trie *t, struct tnode *tn, int i, struct node *n);
};
static void put_child(struct trie *t, struct tnode *tn, int i, struct node *n);
if (!li) {
*err = -ENOMEM;
if (!li) {
*err = -ENOMEM;
if (!l) {
*err = -ENOMEM;
if (!l) {
*err = -ENOMEM;
if (!li) {
tnode_free((struct tnode *) l);
*err = -ENOMEM;
if (!li) {
tnode_free((struct tnode *) l);
*err = -ENOMEM;
free_leaf_info(li);
tnode_free((struct tnode *) l);
*err = -ENOMEM;
free_leaf_info(li);
tnode_free((struct tnode *) l);
*err = -ENOMEM;
}
node_set_parent((struct node *)tn, tp);
}
node_set_parent((struct node *)tn, tp);
rcu_assign_pointer(t->trie, trie_rebalance(t, tp));
done:
rcu_assign_pointer(t->trie, trie_rebalance(t, tp));
done:
* Remove the leaf and rebalance the tree
*/
* Remove the leaf and rebalance the tree
*/
t->size--;
tp = node_parent(n);
t->size--;
tp = node_parent(n);
struct leaf *ll = NULL, *l = NULL;
int found = 0, h;
struct leaf *ll = NULL, *l = NULL;
int found = 0, h;
for (h = 0; (l = nextleaf(t, l)) != NULL; h++) {
found += trie_flush_leaf(t, l);
for (h = 0; (l = nextleaf(t, l)) != NULL; h++) {
found += trie_flush_leaf(t, l);