ipv6: Combine rt6_alloc_cow and rt6_alloc_clone
authorMartin KaFai Lau <kafai@fb.com>
Sat, 23 May 2015 03:55:59 +0000 (20:55 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 May 2015 17:25:33 +0000 (13:25 -0400)
commit8b9df2657704dd313333a79497dde429f9190caa
tree969272169e4dc63fac1ff15c890d5e1290fc3826
parent2647a9b07032c5a95ddee1fcb65d95bddbc6b7f9
ipv6: Combine rt6_alloc_cow and rt6_alloc_clone

A prep work for creating RTF_CACHE on exception only.  After this
patch, the same condition (rt->rt6i_flags & (RTF_NONEXTHOP | RTF_GATEWAY))
is checked twice. This redundancy will be removed in the later patch.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Cc: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c