diff options
Diffstat (limited to 'net/ipv4/fib_trie.c')
-rw-r--r-- | net/ipv4/fib_trie.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 72b3036bbc09..214c34732e84 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -1123,6 +1123,9 @@ err: | |||
1123 | return fa_head; | 1123 | return fa_head; |
1124 | } | 1124 | } |
1125 | 1125 | ||
1126 | /* | ||
1127 | * Caller must hold RTNL. | ||
1128 | */ | ||
1126 | static int fn_trie_insert(struct fib_table *tb, struct fib_config *cfg) | 1129 | static int fn_trie_insert(struct fib_table *tb, struct fib_config *cfg) |
1127 | { | 1130 | { |
1128 | struct trie *t = (struct trie *) tb->tb_data; | 1131 | struct trie *t = (struct trie *) tb->tb_data; |
@@ -1527,7 +1530,6 @@ static int trie_leaf_remove(struct trie *t, t_key key) | |||
1527 | t->revision++; | 1530 | t->revision++; |
1528 | t->size--; | 1531 | t->size--; |
1529 | 1532 | ||
1530 | preempt_disable(); | ||
1531 | tp = NODE_PARENT(n); | 1533 | tp = NODE_PARENT(n); |
1532 | tnode_free((struct tnode *) n); | 1534 | tnode_free((struct tnode *) n); |
1533 | 1535 | ||
@@ -1537,11 +1539,13 @@ static int trie_leaf_remove(struct trie *t, t_key key) | |||
1537 | rcu_assign_pointer(t->trie, trie_rebalance(t, tp)); | 1539 | rcu_assign_pointer(t->trie, trie_rebalance(t, tp)); |
1538 | } else | 1540 | } else |
1539 | rcu_assign_pointer(t->trie, NULL); | 1541 | rcu_assign_pointer(t->trie, NULL); |
1540 | preempt_enable(); | ||
1541 | 1542 | ||
1542 | return 1; | 1543 | return 1; |
1543 | } | 1544 | } |
1544 | 1545 | ||
1546 | /* | ||
1547 | * Caller must hold RTNL. | ||
1548 | */ | ||
1545 | static int fn_trie_delete(struct fib_table *tb, struct fib_config *cfg) | 1549 | static int fn_trie_delete(struct fib_table *tb, struct fib_config *cfg) |
1546 | { | 1550 | { |
1547 | struct trie *t = (struct trie *) tb->tb_data; | 1551 | struct trie *t = (struct trie *) tb->tb_data; |
@@ -1720,6 +1724,9 @@ up: | |||
1720 | return NULL; /* Ready. Root of trie */ | 1724 | return NULL; /* Ready. Root of trie */ |
1721 | } | 1725 | } |
1722 | 1726 | ||
1727 | /* | ||
1728 | * Caller must hold RTNL. | ||
1729 | */ | ||
1723 | static int fn_trie_flush(struct fib_table *tb) | 1730 | static int fn_trie_flush(struct fib_table *tb) |
1724 | { | 1731 | { |
1725 | struct trie *t = (struct trie *) tb->tb_data; | 1732 | struct trie *t = (struct trie *) tb->tb_data; |