OSDN Git Service

net: ipv6: use the new fib6_nh_release_dsts helper in fib6_nh_release
authorNikolay Aleksandrov <nikolay@nvidia.com>
Mon, 29 Nov 2021 15:44:11 +0000 (17:44 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Nov 2021 11:59:53 +0000 (11:59 +0000)
commit6130805066659cda3d685fc4c8d912c72a005ef5
treec34d5c1b8254e5872dddde5e14e6944baebace58
parent7709efa62c4fd2a79d154579ea19be34f9fa9a31
net: ipv6: use the new fib6_nh_release_dsts helper in fib6_nh_release

We can remove a bit of code duplication by reusing the new
fib6_nh_release_dsts helper in fib6_nh_release. Their only difference is
that fib6_nh_release's version doesn't use atomic operation to swap the
pointers because it assumes the fib6_nh is no longer visible, while
fib6_nh_release_dsts can be used anywhere.

Suggested-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c