aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-03-22 20:59:58 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-22 20:59:58 -0400
commit6440cc9e0f48ade57af7be28008cbfa6a991f287 (patch)
tree233300e665ed862dab958087b8afa31baaf0ef5f /net
parent69d1506731168d6845a76a303b2c45f7c05f3f2c (diff)
[IPV4] fib_trie: fix warning from rcu_assign_poinger
This gets rid of a warning caused by the test in rcu_assign_pointer. I tried to fix rcu_assign_pointer, but that devolved into a long set of discussions about doing it right that came to no real solution. Since the test in rcu_assign_pointer for constant NULL would never succeed in fib_trie, just open code instead. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/fib_trie.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 1ff446d0fa8b..f6cdc012eec5 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -177,10 +177,13 @@ static inline struct tnode *node_parent_rcu(struct node *node)
177 return rcu_dereference(ret); 177 return rcu_dereference(ret);
178} 178}
179 179
180/* Same as rcu_assign_pointer
181 * but that macro() assumes that value is a pointer.
182 */
180static inline void node_set_parent(struct node *node, struct tnode *ptr) 183static inline void node_set_parent(struct node *node, struct tnode *ptr)
181{ 184{
182 rcu_assign_pointer(node->parent, 185 smp_wmb();
183 (unsigned long)ptr | NODE_TYPE(node)); 186 node->parent = (unsigned long)ptr | NODE_TYPE(node);
184} 187}
185 188
186static inline struct node *tnode_get_child(struct tnode *tn, unsigned int i) 189static inline struct node *tnode_get_child(struct tnode *tn, unsigned int i)