rcu/kvfree: Move bulk/list reclaim to separate functions
authorUladzislau Rezki (Sony) <urezki@gmail.com>
Tue, 29 Nov 2022 15:58:20 +0000 (16:58 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 4 Jan 2023 01:48:41 +0000 (17:48 -0800)
commit8c15a9e8086508962b2b69456ed22dc517d91b15
tree8ac30fe300a32fc0c01f68da2683900073e46c39
parent27538e18b62fa38d38c593e8c9e050a31b6c8cea
rcu/kvfree: Move bulk/list reclaim to separate functions

The kvfree_rcu() code maintains lists of pages of pointers, but also a
singly linked list, with the latter being used when memory allocation
fails.  Traversal of these two types of lists is currently open coded.
This commit simplifies the code by providing kvfree_rcu_bulk() and
kvfree_rcu_list() functions, respectively, to traverse these two types
of lists.  This patch does not introduce any functional change.

Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tree.c