]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitbb148ab0998d8339812bd6ac4e8c1ece8afead13
treead83cca043fb0c012fc0b43ae5276d4b7c719537
parent126c7e71b96f05465d83e3285ccdc06facd2296f
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