diff options
author | Amerigo Wang <amwang@redhat.com> | 2012-10-28 20:13:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-03 14:59:05 -0400 |
commit | 94e187c01512c9cf29e2ff54bf1a1b045f38293d (patch) | |
tree | 2149f4652fb0fc997ce5728f9574e1ab5351f0e5 /net/ipv6/ip6_tunnel.c | |
parent | 6da025fa23bb10c82f80de319c837ed2b02306e4 (diff) |
ipv6: introduce ip6_rt_put()
As suggested by Eric, we could introduce a helper function
for ipv6 too, to avoid checking if rt is NULL before
dst_release().
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_tunnel.c')
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index cb7e2ded6f08..09482f723064 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -663,8 +663,7 @@ ip6ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
663 | 663 | ||
664 | icmpv6_send(skb2, rel_type, rel_code, rel_info); | 664 | icmpv6_send(skb2, rel_type, rel_code, rel_info); |
665 | 665 | ||
666 | if (rt) | 666 | ip6_rt_put(rt); |
667 | dst_release(&rt->dst); | ||
668 | 667 | ||
669 | kfree_skb(skb2); | 668 | kfree_skb(skb2); |
670 | } | 669 | } |
@@ -1208,7 +1207,7 @@ static void ip6_tnl_link_config(struct ip6_tnl *t) | |||
1208 | if (dev->mtu < IPV6_MIN_MTU) | 1207 | if (dev->mtu < IPV6_MIN_MTU) |
1209 | dev->mtu = IPV6_MIN_MTU; | 1208 | dev->mtu = IPV6_MIN_MTU; |
1210 | } | 1209 | } |
1211 | dst_release(&rt->dst); | 1210 | ip6_rt_put(rt); |
1212 | } | 1211 | } |
1213 | } | 1212 | } |
1214 | 1213 | ||