diff options
Diffstat (limited to 'net/ipv4/route.c')
| -rw-r--r-- | net/ipv4/route.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 21b12de9e653..45651834e1e2 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
| @@ -851,9 +851,7 @@ restart: | |||
| 851 | */ | 851 | */ |
| 852 | rcu_assign_pointer(rt_hash_table[hash].chain, rth); | 852 | rcu_assign_pointer(rt_hash_table[hash].chain, rth); |
| 853 | 853 | ||
| 854 | rth->u.dst.__use++; | 854 | dst_use(&rth->u.dst, now); |
| 855 | dst_hold(&rth->u.dst); | ||
| 856 | rth->u.dst.lastuse = now; | ||
| 857 | spin_unlock_bh(rt_hash_lock_addr(hash)); | 855 | spin_unlock_bh(rt_hash_lock_addr(hash)); |
| 858 | 856 | ||
| 859 | rt_drop(rt); | 857 | rt_drop(rt); |
| @@ -1813,11 +1811,6 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr, | |||
| 1813 | goto martian_destination; | 1811 | goto martian_destination; |
| 1814 | 1812 | ||
| 1815 | err = ip_mkroute_input(skb, &res, &fl, in_dev, daddr, saddr, tos); | 1813 | err = ip_mkroute_input(skb, &res, &fl, in_dev, daddr, saddr, tos); |
| 1816 | if (err == -ENOBUFS) | ||
| 1817 | goto e_nobufs; | ||
| 1818 | if (err == -EINVAL) | ||
| 1819 | goto e_inval; | ||
| 1820 | |||
| 1821 | done: | 1814 | done: |
| 1822 | in_dev_put(in_dev); | 1815 | in_dev_put(in_dev); |
| 1823 | if (free_res) | 1816 | if (free_res) |
| @@ -1935,9 +1928,7 @@ int ip_route_input(struct sk_buff *skb, __be32 daddr, __be32 saddr, | |||
| 1935 | rth->fl.oif == 0 && | 1928 | rth->fl.oif == 0 && |
| 1936 | rth->fl.mark == skb->mark && | 1929 | rth->fl.mark == skb->mark && |
| 1937 | rth->fl.fl4_tos == tos) { | 1930 | rth->fl.fl4_tos == tos) { |
| 1938 | rth->u.dst.lastuse = jiffies; | 1931 | dst_use(&rth->u.dst, jiffies); |
| 1939 | dst_hold(&rth->u.dst); | ||
| 1940 | rth->u.dst.__use++; | ||
| 1941 | RT_CACHE_STAT_INC(in_hit); | 1932 | RT_CACHE_STAT_INC(in_hit); |
| 1942 | rcu_read_unlock(); | 1933 | rcu_read_unlock(); |
| 1943 | skb->dst = (struct dst_entry*)rth; | 1934 | skb->dst = (struct dst_entry*)rth; |
| @@ -2331,9 +2322,7 @@ int __ip_route_output_key(struct rtable **rp, const struct flowi *flp) | |||
| 2331 | rth->fl.mark == flp->mark && | 2322 | rth->fl.mark == flp->mark && |
| 2332 | !((rth->fl.fl4_tos ^ flp->fl4_tos) & | 2323 | !((rth->fl.fl4_tos ^ flp->fl4_tos) & |
| 2333 | (IPTOS_RT_MASK | RTO_ONLINK))) { | 2324 | (IPTOS_RT_MASK | RTO_ONLINK))) { |
| 2334 | rth->u.dst.lastuse = jiffies; | 2325 | dst_use(&rth->u.dst, jiffies); |
| 2335 | dst_hold(&rth->u.dst); | ||
| 2336 | rth->u.dst.__use++; | ||
| 2337 | RT_CACHE_STAT_INC(out_hit); | 2326 | RT_CACHE_STAT_INC(out_hit); |
| 2338 | rcu_read_unlock_bh(); | 2327 | rcu_read_unlock_bh(); |
| 2339 | *rp = rth; | 2328 | *rp = rth; |
