bridge: move br_net_exit() to br.c
authorWANG Cong <xiyou.wangcong@gmail.com>
Fri, 10 Jan 2014 21:58:47 +0000 (13:58 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Jan 2014 07:42:39 +0000 (23:42 -0800)
And it can become static.

Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br.c
net/bridge/br_if.c
net/bridge/br_private.h

index ba780cc8e515d2dcd6424d627c286ec1ceb86a47..19311aafcf5a06e6ae7abaaf82527711573dc6d6 100644 (file)
 
 #include "br_private.h"
 
-static const struct stp_proto br_stp_proto = {
-       .rcv    = br_stp_rcv,
-};
+static void __net_exit br_net_exit(struct net *net)
+{
+       struct net_device *dev;
+       LIST_HEAD(list);
+
+       rtnl_lock();
+       for_each_netdev(net, dev)
+               if (dev->priv_flags & IFF_EBRIDGE)
+                       br_dev_delete(dev, &list);
+
+       unregister_netdevice_many(&list);
+       rtnl_unlock();
+
+}
 
 static struct pernet_operations br_net_ops = {
        .exit   = br_net_exit,
 };
 
+static const struct stp_proto br_stp_proto = {
+       .rcv    = br_stp_rcv,
+};
+
 static int __init br_init(void)
 {
        int err;
index 1f6bd1e2e8a4dc51aa2dcf56743fb4e3c0248321..cffe1d666ba11636cc7e3d374018edf7ac31535b 100644 (file)
@@ -455,18 +455,3 @@ int br_del_if(struct net_bridge *br, struct net_device *dev)
 
        return 0;
 }
-
-void __net_exit br_net_exit(struct net *net)
-{
-       struct net_device *dev;
-       LIST_HEAD(list);
-
-       rtnl_lock();
-       for_each_netdev(net, dev)
-               if (dev->priv_flags & IFF_EBRIDGE)
-                       br_dev_delete(dev, &list);
-
-       unregister_netdevice_many(&list);
-       rtnl_unlock();
-
-}
index 3733f152351c2eedcea3f63a1d35499a0c618a1f..fcd12333c59b319de7c11c1ddc86214195725e46 100644 (file)
@@ -407,7 +407,6 @@ void br_flood_forward(struct net_bridge *br, struct sk_buff *skb,
 void br_port_carrier_check(struct net_bridge_port *p);
 int br_add_bridge(struct net *net, const char *name);
 int br_del_bridge(struct net *net, const char *name);
-void br_net_exit(struct net *net);
 int br_add_if(struct net_bridge *br, struct net_device *dev);
 int br_del_if(struct net_bridge *br, struct net_device *dev);
 int br_min_mtu(const struct net_bridge *br);