diff options
author | Brian Norris <computersforpeace@gmail.com> | 2014-07-21 08:59:16 +0200 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2014-07-21 09:01:16 +0200 |
commit | d0d5864676dbccfb1337864a0ae6ce97e6342678 (patch) | |
tree | 7caa674ec05a1797054cd4304f0a047b6dacddd6 /net/8021q/vlan_dev.c | |
parent | mtd: cfi_cmdset_0002: fix do_write_buffer() timeout error (diff) | |
parent | Linux 3.16-rc6 (diff) | |
download | linux-d0d5864676dbccfb1337864a0ae6ce97e6342678.tar.xz linux-d0d5864676dbccfb1337864a0ae6ce97e6342678.zip |
Merge tag 'v3.16-rc6' into MTD development branch
Linux 3.16-rc6
Diffstat (limited to 'net/8021q/vlan_dev.c')
-rw-r--r-- | net/8021q/vlan_dev.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index ad2ac3c00398..dd11f612e03e 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -627,8 +627,6 @@ static void vlan_dev_uninit(struct net_device *dev) struct vlan_dev_priv *vlan = vlan_dev_priv(dev); int i; - free_percpu(vlan->vlan_pcpu_stats); - vlan->vlan_pcpu_stats = NULL; for (i = 0; i < ARRAY_SIZE(vlan->egress_priority_map); i++) { while ((pm = vlan->egress_priority_map[i]) != NULL) { vlan->egress_priority_map[i] = pm->next; @@ -785,6 +783,15 @@ static const struct net_device_ops vlan_netdev_ops = { .ndo_get_lock_subclass = vlan_dev_get_lock_subclass, }; +static void vlan_dev_free(struct net_device *dev) +{ + struct vlan_dev_priv *vlan = vlan_dev_priv(dev); + + free_percpu(vlan->vlan_pcpu_stats); + vlan->vlan_pcpu_stats = NULL; + free_netdev(dev); +} + void vlan_setup(struct net_device *dev) { ether_setup(dev); @@ -794,7 +801,7 @@ void vlan_setup(struct net_device *dev) dev->tx_queue_len = 0; dev->netdev_ops = &vlan_netdev_ops; - dev->destructor = free_netdev; + dev->destructor = vlan_dev_free; dev->ethtool_ops = &vlan_ethtool_ops; memset(dev->broadcast, 0, ETH_ALEN); |