diff options
Diffstat (limited to 'net/bridge/br_if.c')
-rw-r--r-- | net/bridge/br_if.c | 9 |
1 files changed, 5 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(); |