rcu: Refactor kvfree_call_rcu() and high-level helpers
authorUladzislau Rezki (Sony) <urezki@gmail.com>
Tue, 25 Oct 2022 14:46:12 +0000 (16:46 +0200)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 4 Jan 2023 01:48:40 +0000 (17:48 -0800)
commit04a522b7da3dbc083f8ae0aa1a6184b959a8f81c
tree492ecb846a88726dbc2221b93b6217ad8200ce5c
parent1b929c02afd37871d5afb9d498426f83432e71c2
rcu: Refactor kvfree_call_rcu() and high-level helpers

Currently a kvfree_call_rcu() takes an offset within a structure as
a second parameter, so a helper such as a kvfree_rcu_arg_2() has to
convert rcu_head and a freed ptr to an offset in order to pass it. That
leads to an extra conversion on macro entry.

Instead of converting, refactor the code in way that a pointer that has
to be freed is passed directly to the kvfree_call_rcu().

This patch does not make any functional change and is transparent to
all kvfree_rcu() users.

Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
include/linux/rcupdate.h
include/linux/rcutiny.h
include/linux/rcutree.h
kernel/rcu/tiny.c
kernel/rcu/tree.c