diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-08-11 15:30:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-12 05:55:28 -0400 |
commit | 33d480ce6d43326e2541fd79b3548858a174ec3c (patch) | |
tree | c938ee8c07a2e0f33178069b55439a54188f38fa /net/ipv4/route.c | |
parent | cd28ca0a3dd17c68d24b839602a0e6268ad28b5d (diff) |
net: cleanup some rcu_dereference_raw
RCU api had been completed and rcu_access_pointer() or
rcu_dereference_protected() are better than generic
rcu_dereference_raw()
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index cb7efe0567f0..d6e32138f712 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -324,7 +324,7 @@ static struct rtable *rt_cache_get_first(struct seq_file *seq) | |||
324 | struct rtable *r = NULL; | 324 | struct rtable *r = NULL; |
325 | 325 | ||
326 | for (st->bucket = rt_hash_mask; st->bucket >= 0; --st->bucket) { | 326 | for (st->bucket = rt_hash_mask; st->bucket >= 0; --st->bucket) { |
327 | if (!rcu_dereference_raw(rt_hash_table[st->bucket].chain)) | 327 | if (!rcu_access_pointer(rt_hash_table[st->bucket].chain)) |
328 | continue; | 328 | continue; |
329 | rcu_read_lock_bh(); | 329 | rcu_read_lock_bh(); |
330 | r = rcu_dereference_bh(rt_hash_table[st->bucket].chain); | 330 | r = rcu_dereference_bh(rt_hash_table[st->bucket].chain); |
@@ -350,7 +350,7 @@ static struct rtable *__rt_cache_get_next(struct seq_file *seq, | |||
350 | do { | 350 | do { |
351 | if (--st->bucket < 0) | 351 | if (--st->bucket < 0) |
352 | return NULL; | 352 | return NULL; |
353 | } while (!rcu_dereference_raw(rt_hash_table[st->bucket].chain)); | 353 | } while (!rcu_access_pointer(rt_hash_table[st->bucket].chain)); |
354 | rcu_read_lock_bh(); | 354 | rcu_read_lock_bh(); |
355 | r = rcu_dereference_bh(rt_hash_table[st->bucket].chain); | 355 | r = rcu_dereference_bh(rt_hash_table[st->bucket].chain); |
356 | } | 356 | } |
@@ -762,7 +762,7 @@ static void rt_do_flush(struct net *net, int process_context) | |||
762 | 762 | ||
763 | if (process_context && need_resched()) | 763 | if (process_context && need_resched()) |
764 | cond_resched(); | 764 | cond_resched(); |
765 | rth = rcu_dereference_raw(rt_hash_table[i].chain); | 765 | rth = rcu_access_pointer(rt_hash_table[i].chain); |
766 | if (!rth) | 766 | if (!rth) |
767 | continue; | 767 | continue; |
768 | 768 | ||