The preparations to this are done with my patch, that fixed
proc on vlan device rename.
This makes /proc/net/vlan/<device> file migrate from one
proc tree to another...
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
---
net/8021q/vlan.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 7e9d22e..2a739ad 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -154,8 +154,6 @@ void unregister_vlan_dev(struct net_device *dev)
grp = __vlan_find_group(real_dev);
BUG_ON(!grp);
- vlan_proc_rem_dev(dev);
-
/* Take it out of our own structures, but be sure to interlock with
* HW accelerating devices or SW vlan input packet processing.
*/
@@ -278,9 +276,6 @@ int register_vlan_dev(struct net_device *dev)
if (real_dev->features & NETIF_F_HW_VLAN_FILTER)
real_dev->vlan_rx_add_vid(real_dev, vlan_id);
- if (vlan_proc_add_dev(dev) < 0)
- pr_warning("8021q: failed to add proc entry for %s\n",
- dev->name);
return 0;
out_free_group:
@@ -396,6 +391,14 @@ static void __vlan_device_event(struct net_device *dev, unsigned long event)
pr_warning("8021q: failed to change proc name for %s\n",
dev->name);
break;
+ case NETDEV_REGISTER:
+ if (vlan_proc_add_dev(dev) < 0)
+ pr_warning("8021q: failed to add proc entry for %s\n",
+ dev->name);
+ break;
+ case NETDEV_UNREGISTER:
+ vlan_proc_rem_dev(dev);
+ break;
}
}
--
1.5.3.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html| Brandeburg, Jesse | RE: [regression] e1000e broke e1000 (was: Re: [ANNOUNCE] e1000 toe1000e migration ... |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Linus Torvalds | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| IKEDA Munehiro | [RFD] Documentation/stable_api_nonsense.txt translated into Japanese |
git: | |
| Gerrit Renker | [PATCH 02/37] dccp: Implement lookup table for feature-negotiation information |
| Paweł Staszewski | Re: rib_trie / Fix inflate_threshold_root. Now=15 size=11 bits |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
