aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_trie.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-01-12 23:50:23 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:01:53 -0500
commit93e4308b3bea445dc2d3e3c1897a93fe111eba17 (patch)
tree1fa726f06cf03116cefccb6f6cfd9e8bd91745eb /net/ipv4/fib_trie.c
parentc28a1cf448e59019fa681741963c3acaeaeb6d27 (diff)
[IPV4] fib_trie: Get rid of unused revision element.
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>
Diffstat (limited to 'net/ipv4/fib_trie.c')
-rw-r--r--net/ipv4/fib_trie.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 0179d245c81f..95a62aae5f48 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -153,7 +153,6 @@ struct trie {
153 struct trie_use_stats stats; 153 struct trie_use_stats stats;
154#endif 154#endif
155 int size; 155 int size;
156 unsigned int revision;
157}; 156};
158 157
159static void put_child(struct trie *t, struct tnode *tn, int i, struct node *n); 158static void put_child(struct trie *t, struct tnode *tn, int i, struct node *n);
@@ -1046,7 +1045,7 @@ fib_insert_node(struct trie *t, int *err, u32 key, int plen)
1046 1045
1047 if (!li) { 1046 if (!li) {
1048 *err = -ENOMEM; 1047 *err = -ENOMEM;
1049 goto err; 1048 goto done;
1050 } 1049 }
1051 1050
1052 fa_head = &li->falh; 1051 fa_head = &li->falh;
@@ -1058,7 +1057,7 @@ fib_insert_node(struct trie *t, int *err, u32 key, int plen)
1058 1057
1059 if (!l) { 1058 if (!l) {
1060 *err = -ENOMEM; 1059 *err = -ENOMEM;
1061 goto err; 1060 goto done;
1062 } 1061 }
1063 1062
1064 l->key = key; 1063 l->key = key;
@@ -1067,7 +1066,7 @@ fib_insert_node(struct trie *t, int *err, u32 key, int plen)
1067 if (!li) { 1066 if (!li) {
1068 tnode_free((struct tnode *) l); 1067 tnode_free((struct tnode *) l);
1069 *err = -ENOMEM; 1068 *err = -ENOMEM;
1070 goto err; 1069 goto done;
1071 } 1070 }
1072 1071
1073 fa_head = &li->falh; 1072 fa_head = &li->falh;
@@ -1104,7 +1103,7 @@ fib_insert_node(struct trie *t, int *err, u32 key, int plen)
1104 free_leaf_info(li); 1103 free_leaf_info(li);
1105 tnode_free((struct tnode *) l); 1104 tnode_free((struct tnode *) l);
1106 *err = -ENOMEM; 1105 *err = -ENOMEM;
1107 goto err; 1106 goto done;
1108 } 1107 }
1109 1108
1110 node_set_parent((struct node *)tn, tp); 1109 node_set_parent((struct node *)tn, tp);
@@ -1130,8 +1129,6 @@ fib_insert_node(struct trie *t, int *err, u32 key, int plen)
1130 1129
1131 rcu_assign_pointer(t->trie, trie_rebalance(t, tp)); 1130 rcu_assign_pointer(t->trie, trie_rebalance(t, tp));
1132done: 1131done:
1133 t->revision++;
1134err:
1135 return fa_head; 1132 return fa_head;
1136} 1133}
1137 1134
@@ -1546,7 +1543,6 @@ static int trie_leaf_remove(struct trie *t, t_key key)
1546 * Remove the leaf and rebalance the tree 1543 * Remove the leaf and rebalance the tree
1547 */ 1544 */
1548 1545
1549 t->revision++;
1550 t->size--; 1546 t->size--;
1551 1547
1552 tp = node_parent(n); 1548 tp = node_parent(n);
@@ -1752,8 +1748,6 @@ static int fn_trie_flush(struct fib_table *tb)
1752 struct leaf *ll = NULL, *l = NULL; 1748 struct leaf *ll = NULL, *l = NULL;
1753 int found = 0, h; 1749 int found = 0, h;
1754 1750
1755 t->revision++;
1756
1757 for (h = 0; (l = nextleaf(t, l)) != NULL; h++) { 1751 for (h = 0; (l = nextleaf(t, l)) != NULL; h++) {
1758 found += trie_flush_leaf(t, l); 1752 found += trie_flush_leaf(t, l);
1759 1753