From: Gao feng Date: Wed, 19 Oct 2011 15:34:09 +0000 (+0000) Subject: ipv4: avoid useless call of the function check_peer_pmtu X-Git-Tag: MMI-PSA29.97-13-9~18247^2~9 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=59445b6b1f90b97c4e28062b96306bacfa4fb170;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ipv4: avoid useless call of the function check_peer_pmtu In func ipv4_dst_check,check_peer_pmtu should be called only when peer is updated. So,if the peer is not updated in ip_rt_frag_needed,we can not inc __rt_peer_genid. Signed-off-by: Gao feng Acked-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 1082460daca7..155138d8ec8b 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -1593,11 +1593,10 @@ unsigned short ip_rt_frag_needed(struct net *net, const struct iphdr *iph, est_mtu = mtu; peer->pmtu_learned = mtu; peer->pmtu_expires = pmtu_expires; + atomic_inc(&__rt_peer_genid); } inet_putpeer(peer); - - atomic_inc(&__rt_peer_genid); } return est_mtu ? : new_mtu; }