diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-04-03 01:06:59 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-04-03 01:06:59 -0400 |
commit | a8e28440016bfb23bec266c4c66eacca6ea2d48b (patch) | |
tree | 27d528294f7886c434c8072a034d211acc06d077 /drivers/net/vrf.c | |
parent | 2b5efc089769cd2aa583880d29416d00e7441f39 (diff) | |
parent | 3209f68b3ca4667069923a325c88b21131bfdf9f (diff) | |
download | linux-a8e28440016bfb23bec266c4c66eacca6ea2d48b.tar.bz2 |
Merge branch 'work.statx' into for-next
Diffstat (limited to 'drivers/net/vrf.c')
-rw-r--r-- | drivers/net/vrf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c index 22379da63400..d6988db1930d 100644 --- a/drivers/net/vrf.c +++ b/drivers/net/vrf.c @@ -340,6 +340,7 @@ static netdev_tx_t is_ip_tx_frame(struct sk_buff *skb, struct net_device *dev) static netdev_tx_t vrf_xmit(struct sk_buff *skb, struct net_device *dev) { + int len = skb->len; netdev_tx_t ret = is_ip_tx_frame(skb, dev); if (likely(ret == NET_XMIT_SUCCESS || ret == NET_XMIT_CN)) { @@ -347,7 +348,7 @@ static netdev_tx_t vrf_xmit(struct sk_buff *skb, struct net_device *dev) u64_stats_update_begin(&dstats->syncp); dstats->tx_pkts++; - dstats->tx_bytes += skb->len; + dstats->tx_bytes += len; u64_stats_update_end(&dstats->syncp); } else { this_cpu_inc(dev->dstats->tx_drps); @@ -461,8 +462,10 @@ static void vrf_rt6_release(struct net_device *dev, struct net_vrf *vrf) } if (rt6_local) { - if (rt6_local->rt6i_idev) + if (rt6_local->rt6i_idev) { in6_dev_put(rt6_local->rt6i_idev); + rt6_local->rt6i_idev = NULL; + } dst = &rt6_local->dst; dev_put(dst->dev); |