can: gw: switch cangw_pernet_exit() to batch mode
authorEric Dumazet <edumazet@google.com>
Tue, 8 Feb 2022 04:50:36 +0000 (20:50 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 9 Feb 2022 04:41:35 +0000 (20:41 -0800)
commitef0de6696c38cbefba64fc1e29c18882bac1f747
tree7e3d083d9d8e0b0f2fd554a2d8213ec9a74136d8
parent696e595f707582cd54900d57041721b5223dfdb9
can: gw: switch cangw_pernet_exit() to batch mode

cleanup_net() is competing with other rtnl users.

Avoiding to acquire rtnl for each netns before calling
cgw_remove_all_jobs() gives chance for cleanup_net()
to progress much faster, holding rtnl a bit longer.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/can/gw.c