aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorRobert Olsson <robert.olsson@its.uu.se>2007-03-16 18:00:07 -0400
committerDavid S. Miller <davem@davemloft.net>2007-03-16 18:00:07 -0400
commitd5cc4a73a5b5c8374b810d5371e9e7ed05c1e02c (patch)
tree9fc98bedcecf6f910ec0c76f28e15fbda1ff6f1e /net
parentdb98e0b434a6265c451ffe94ec0a29b8d0aaf587 (diff)
[IPV4]: Do not disable preemption in trie_leaf_remove().
Hello, Just discussed this Patrick... We have two users of trie_leaf_remove, fn_trie_flush and fn_trie_delete both are holding RTNL. So there shouldn't be need for this preempt stuff. This is assumed to a leftover from an older RCU-take. > Mhh .. I think I just remembered something - me incorrectly suggesting > to add it there while we were talking about this at OLS :) IIRC the > idea was to make sure tnode_free (which at that time didn't use > call_rcu) wouldn't free memory while still in use in a rcu read-side > critical section. It should have been synchronize_rcu of course, > but with tnode_free using call_rcu it seems to be completely > unnecessary. So I guess we can simply remove it. Signed-off-by: Robert Olsson <robert.olsson@its.uu.se> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/fib_trie.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 72b3036bbc09..ada9b3db507d 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1527,7 +1527,6 @@ static int trie_leaf_remove(struct trie *t, t_key key)
1527 t->revision++; 1527 t->revision++;
1528 t->size--; 1528 t->size--;
1529 1529
1530 preempt_disable();
1531 tp = NODE_PARENT(n); 1530 tp = NODE_PARENT(n);
1532 tnode_free((struct tnode *) n); 1531 tnode_free((struct tnode *) n);
1533 1532
@@ -1537,7 +1536,6 @@ static int trie_leaf_remove(struct trie *t, t_key key)
1537 rcu_assign_pointer(t->trie, trie_rebalance(t, tp)); 1536 rcu_assign_pointer(t->trie, trie_rebalance(t, tp));
1538 } else 1537 } else
1539 rcu_assign_pointer(t->trie, NULL); 1538 rcu_assign_pointer(t->trie, NULL);
1540 preempt_enable();
1541 1539
1542 return 1; 1540 return 1;
1543} 1541}