Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145274
b: refs/heads/master
c: 3ed18d7
h: refs/heads/master
v: v3
  • Loading branch information
Robert Olsson authored and David S. Miller committed May 21, 2009
1 parent 67ec963 commit 7e21751
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5b5f792a6a9a2f9ae812d151ed621f72e99b1725
refs/heads/master: 3ed18d76d959e5cbfa5d70c8f7ba95476582a556
6 changes: 5 additions & 1 deletion trunk/net/ipv4/fib_trie.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,9 +986,12 @@ fib_find_node(struct trie *t, u32 key)
static struct node *trie_rebalance(struct trie *t, struct tnode *tn)
{
int wasfull;
t_key cindex, key = tn->key;
t_key cindex, key;
struct tnode *tp;

preempt_disable();
key = tn->key;

while (tn != NULL && (tp = node_parent((struct node *)tn)) != NULL) {
cindex = tkey_extract_bits(key, tp->pos, tp->bits);
wasfull = tnode_full(tp, tnode_get_child(tp, cindex));
Expand All @@ -1007,6 +1010,7 @@ static struct node *trie_rebalance(struct trie *t, struct tnode *tn)
if (IS_TNODE(tn))
tn = (struct tnode *)resize(t, (struct tnode *)tn);

preempt_enable();
return (struct node *)tn;
}

Expand Down

0 comments on commit 7e21751

Please sign in to comment.