diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-11-15 01:38:14 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-15 14:13:18 -0500 |
commit | ec1e5610c00c7f5bc530d2aadd47faa473b90a30 (patch) | |
tree | c3bc845f485911083e47e218e7f01eba4de1bbfd /net/bridge/br_private.h | |
parent | b5ed54e94d324f17c97852296d61a143f01b227a (diff) |
bridge: add RCU annotations to bridge port lookup
br_port_get() renamed to br_port_get_rtnl() to make clear RTNL is held.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_private.h')
-rw-r--r-- | net/bridge/br_private.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 46e0bec1d7c5..84aac7734bfc 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h | |||
@@ -159,9 +159,10 @@ static inline struct net_bridge_port *br_port_get_rcu(const struct net_device *d | |||
159 | return br_port_exists(dev) ? port : NULL; | 159 | return br_port_exists(dev) ? port : NULL; |
160 | } | 160 | } |
161 | 161 | ||
162 | static inline struct net_bridge_port *br_port_get(struct net_device *dev) | 162 | static inline struct net_bridge_port *br_port_get_rtnl(struct net_device *dev) |
163 | { | 163 | { |
164 | return br_port_exists(dev) ? dev->rx_handler_data : NULL; | 164 | return br_port_exists(dev) ? |
165 | rtnl_dereference(dev->rx_handler_data) : NULL; | ||
165 | } | 166 | } |
166 | 167 | ||
167 | struct br_cpu_netstats { | 168 | struct br_cpu_netstats { |