From: David S. Miller Date: Sat, 5 Mar 2011 05:26:07 +0000 (-0800) Subject: ipv4: Get peer more cheaply in rt_init_metrics(). X-Git-Tag: v2.6.39-rc1~468^2~155 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3c0afdca44af795dd315c20cc525927a459abe30;p=platform%2Fkernel%2Flinux-3.10.git ipv4: Get peer more cheaply in rt_init_metrics(). We know this is a new route object, so doing atomics and stuff makes no sense at all. Signed-off-by: David S. Miller --- diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 6c87403..9794a2c 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -1759,9 +1759,9 @@ static void rt_init_metrics(struct rtable *rt, struct fib_info *fi) if (rt->fl.flags & FLOWI_FLAG_PRECOW_METRICS) create = 1; - rt_bind_peer(rt, create); - peer = rt->peer; + rt->peer = peer = inet_getpeer_v4(rt->rt_dst, create); if (peer) { + rt->rt_peer_genid = rt_peer_genid(); if (inet_metrics_new(peer)) memcpy(peer->metrics, fi->fib_metrics, sizeof(u32) * RTAX_MAX);