can: gw: use call_rcu() instead of costly synchronize_rcu()
authorEric Dumazet <edumazet@google.com>
Mon, 7 Feb 2022 19:07:06 +0000 (11:07 -0800)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 24 Feb 2022 07:26:03 +0000 (08:26 +0100)
commit181d4447905d551cc664f1e7e796b482c1eec992
tree28962c41f02866e4d6d0a928c9747ddb97a9d578
parent58212e03e5ec315b368afea5a32a87866feb59b0
can: gw: use call_rcu() instead of costly synchronize_rcu()

Commit fb8696ab14ad ("can: gw: synchronize rcu operations
before removing gw job entry") added three synchronize_rcu() calls
to make sure one rcu grace period was observed before freeing
a "struct cgw_job" (which are tiny objects).

This should be converted to call_rcu() to avoid adding delays
in device / network dismantles.

Use the rcu_head that was already in struct cgw_job,
not yet used.

Link: https://lore.kernel.org/all/20220207190706.1499190-1-eric.dumazet@gmail.com
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Oliver Hartkopp <socketcan@hartkopp.net>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
net/can/gw.c