From e086cadc08e259150b2ab8f7f4a16dbf9e3c2f22 Mon Sep 17 00:00:00 2001 From: Amerigo Wang Date: Sun, 11 Nov 2012 21:52:34 +0000 Subject: net: unify for_each_ip_tunnel_rcu() The defitions of for_each_ip_tunnel_rcu() are same, so unify it. Also, don't hide the parameter 't'. Cc: David S. Miller Signed-off-by: Cong Wang Signed-off-by: David S. Miller --- include/linux/if_tunnel.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux/if_tunnel.h') diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index 06d1d5badd36..f4e56ecd0b1a 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h @@ -6,6 +6,13 @@ #include #include +/* + * Locking : hash tables are protected by RCU and RTNL + */ + +#define for_each_ip_tunnel_rcu(pos, start) \ + for (pos = rcu_dereference(start); pos; pos = rcu_dereference(pos->next)) + /* often modified stats are per cpu, other are shared (netdev->stats) */ struct pcpu_tstats { u64 rx_packets; -- cgit v1.2.3-59-g8ed1b