ipv6: Re-arrange code in rt6_probe()
authorMartin KaFai Lau <kafai@fb.com>
Fri, 24 Jul 2015 16:57:42 +0000 (09:57 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jul 2015 08:08:25 +0000 (01:08 -0700)
commit990edb428c2c85c22ca770330437db7183cbe8b5
treead83cca043fb0c012fc0b43ae5276d4b7c719537
parent205845a34763432040496908c8f52f1f97e5ee62
ipv6: Re-arrange code in rt6_probe()

It is a prep work for the next patch to remove write_lock
from rt6_probe().

1. Reduce the number of if(neigh) check.  From 4 to 1.
2. Bring the write_(un)lock() closer to the operations that the
   lock is protecting.

Hopefully, the above make rt6_probe() more readable.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Julian Anastasov <ja@ssi.bg>
Cc: YOSHIFUJI Hideaki <hideaki.yoshifuji@miraclelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c