diff options
author | David S. Miller <davem@davemloft.net> | 2011-10-24 18:18:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-24 18:18:09 -0400 |
commit | 1805b2f04855f07afe3a71d620a68f483b0ed74f (patch) | |
tree | b823b90f37f5404fcaef70f785c70112ca74a329 /net/bridge | |
parent | 78d81d15b74246c7cedf84894434890b33da3907 (diff) | |
parent | f42af6c486aa5ca6ee62800cb45c5b252020509d (diff) |
Merge branch 'master' of ra.kernel.org:/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_if.c | 9 | ||||
-rw-r--r-- | net/bridge/br_netlink.c | 1 | ||||
-rw-r--r-- | net/bridge/br_private.h | 1 |
3 files changed, 7 insertions, 4 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index c3b77dceb937..f603e5b0b930 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -160,9 +160,10 @@ static void del_nbp(struct net_bridge_port *p) | |||
160 | call_rcu(&p->rcu, destroy_nbp_rcu); | 160 | call_rcu(&p->rcu, destroy_nbp_rcu); |
161 | } | 161 | } |
162 | 162 | ||
163 | /* called with RTNL */ | 163 | /* Delete bridge device */ |
164 | static void del_br(struct net_bridge *br, struct list_head *head) | 164 | void br_dev_delete(struct net_device *dev, struct list_head *head) |
165 | { | 165 | { |
166 | struct net_bridge *br = netdev_priv(dev); | ||
166 | struct net_bridge_port *p, *n; | 167 | struct net_bridge_port *p, *n; |
167 | 168 | ||
168 | list_for_each_entry_safe(p, n, &br->port_list, list) { | 169 | list_for_each_entry_safe(p, n, &br->port_list, list) { |
@@ -267,7 +268,7 @@ int br_del_bridge(struct net *net, const char *name) | |||
267 | } | 268 | } |
268 | 269 | ||
269 | else | 270 | else |
270 | del_br(netdev_priv(dev), NULL); | 271 | br_dev_delete(dev, NULL); |
271 | 272 | ||
272 | rtnl_unlock(); | 273 | rtnl_unlock(); |
273 | return ret; | 274 | return ret; |
@@ -446,7 +447,7 @@ void __net_exit br_net_exit(struct net *net) | |||
446 | rtnl_lock(); | 447 | rtnl_lock(); |
447 | for_each_netdev(net, dev) | 448 | for_each_netdev(net, dev) |
448 | if (dev->priv_flags & IFF_EBRIDGE) | 449 | if (dev->priv_flags & IFF_EBRIDGE) |
449 | del_br(netdev_priv(dev), &list); | 450 | br_dev_delete(dev, &list); |
450 | 451 | ||
451 | unregister_netdevice_many(&list); | 452 | unregister_netdevice_many(&list); |
452 | rtnl_unlock(); | 453 | rtnl_unlock(); |
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index 5b1ed1ba9aa7..e5f9ece3c9a0 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c | |||
@@ -210,6 +210,7 @@ static struct rtnl_link_ops br_link_ops __read_mostly = { | |||
210 | .priv_size = sizeof(struct net_bridge), | 210 | .priv_size = sizeof(struct net_bridge), |
211 | .setup = br_dev_setup, | 211 | .setup = br_dev_setup, |
212 | .validate = br_validate, | 212 | .validate = br_validate, |
213 | .dellink = br_dev_delete, | ||
213 | }; | 214 | }; |
214 | 215 | ||
215 | int __init br_netlink_init(void) | 216 | int __init br_netlink_init(void) |
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index a248fe65b29a..d7d6fb05411f 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h | |||
@@ -301,6 +301,7 @@ static inline int br_is_root_bridge(const struct net_bridge *br) | |||
301 | 301 | ||
302 | /* br_device.c */ | 302 | /* br_device.c */ |
303 | extern void br_dev_setup(struct net_device *dev); | 303 | extern void br_dev_setup(struct net_device *dev); |
304 | extern void br_dev_delete(struct net_device *dev, struct list_head *list); | ||
304 | extern netdev_tx_t br_dev_xmit(struct sk_buff *skb, | 305 | extern netdev_tx_t br_dev_xmit(struct sk_buff *skb, |
305 | struct net_device *dev); | 306 | struct net_device *dev); |
306 | #ifdef CONFIG_NET_POLL_CONTROLLER | 307 | #ifdef CONFIG_NET_POLL_CONTROLLER |