From: Eric W. Biederman Date: Wed, 16 Sep 2015 01:04:10 +0000 (-0500) Subject: ipv6: Cache net in ip6_output X-Git-Tag: v4.14-rc1~4436^2~329^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=19a0644ca31c7e22abdb4058ea013f1f7abf7327;p=platform%2Fkernel%2Flinux-rpi.git ipv6: Cache net in ip6_output Keep net in a local variable so I can use it in NF_HOOK_COND when I pass struct net to all of the netfilter hooks. Signed-off-by: "Eric W. Biederman" Signed-off-by: David S. Miller --- diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 12d0166a..8cab909 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -135,9 +135,9 @@ int ip6_output(struct sock *sk, struct sk_buff *skb) { struct net_device *dev = skb_dst(skb)->dev; struct inet6_dev *idev = ip6_dst_idev(skb_dst(skb)); + struct net *net = dev_net(dev); if (unlikely(idev->cnf.disable_ipv6)) { - IP6_INC_STATS(dev_net(dev), idev, - IPSTATS_MIB_OUTDISCARDS); + IP6_INC_STATS(net, idev, IPSTATS_MIB_OUTDISCARDS); kfree_skb(skb); return 0; }