diff options
-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 e73815456adf..1d420f64ff27 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -161,9 +161,10 @@ static void del_nbp(struct net_bridge_port *p) | |||
161 | call_rcu(&p->rcu, destroy_nbp_rcu); | 161 | call_rcu(&p->rcu, destroy_nbp_rcu); |
162 | } | 162 | } |
163 | 163 | ||
164 | /* called with RTNL */ | 164 | /* Delete bridge device */ |
165 | static void del_br(struct net_bridge *br, struct list_head *head) | 165 | void br_dev_delete(struct net_device *dev, struct list_head *head) |
166 | { | 166 | { |
167 | struct net_bridge *br = netdev_priv(dev); | ||
167 | struct net_bridge_port *p, *n; | 168 | struct net_bridge_port *p, *n; |
168 | 169 | ||
169 | list_for_each_entry_safe(p, n, &br->port_list, list) { | 170 | list_for_each_entry_safe(p, n, &br->port_list, list) { |
@@ -268,7 +269,7 @@ int br_del_bridge(struct net *net, const char *name) | |||
268 | } | 269 | } |
269 | 270 | ||
270 | else | 271 | else |
271 | del_br(netdev_priv(dev), NULL); | 272 | br_dev_delete(dev, NULL); |
272 | 273 | ||
273 | rtnl_unlock(); | 274 | rtnl_unlock(); |
274 | return ret; | 275 | return ret; |
@@ -449,7 +450,7 @@ void __net_exit br_net_exit(struct net *net) | |||
449 | rtnl_lock(); | 450 | rtnl_lock(); |
450 | for_each_netdev(net, dev) | 451 | for_each_netdev(net, dev) |
451 | if (dev->priv_flags & IFF_EBRIDGE) | 452 | if (dev->priv_flags & IFF_EBRIDGE) |
452 | del_br(netdev_priv(dev), &list); | 453 | br_dev_delete(dev, &list); |
453 | 454 | ||
454 | unregister_netdevice_many(&list); | 455 | unregister_netdevice_many(&list); |
455 | rtnl_unlock(); | 456 | 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 78cc364997d9..857a021deea9 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h | |||
@@ -294,6 +294,7 @@ static inline int br_is_root_bridge(const struct net_bridge *br) | |||
294 | 294 | ||
295 | /* br_device.c */ | 295 | /* br_device.c */ |
296 | extern void br_dev_setup(struct net_device *dev); | 296 | extern void br_dev_setup(struct net_device *dev); |
297 | extern void br_dev_delete(struct net_device *dev, struct list_head *list); | ||
297 | extern netdev_tx_t br_dev_xmit(struct sk_buff *skb, | 298 | extern netdev_tx_t br_dev_xmit(struct sk_buff *skb, |
298 | struct net_device *dev); | 299 | struct net_device *dev); |
299 | #ifdef CONFIG_NET_POLL_CONTROLLER | 300 | #ifdef CONFIG_NET_POLL_CONTROLLER |