• Martin KaFai Lau's avatar
    ipv6: Re-arrange code in rt6_probe() · 990edb42
    Martin KaFai Lau authored
    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: default avatarMartin 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: default avatarDavid S. Miller <davem@davemloft.net>
    990edb42
route.c 85.2 KB