kvfree_rcu: Use [READ/WRITE]_ONCE() macros to access to nr_bkv_objs
authorUladzislau Rezki (Sony) <urezki@gmail.com>
Thu, 15 Apr 2021 17:19:57 +0000 (19:19 +0200)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 10 May 2021 23:00:48 +0000 (16:00 -0700)
commitac7625ebd5f7bad93f821b7397fe50635f58aa4b
tree90c49b7ecc0f899a41490673c3832547d8177ca2
parentd0bfa8b3c411e25e014e4131d2804afe29c440a6
kvfree_rcu: Use [READ/WRITE]_ONCE() macros to access to nr_bkv_objs

nr_bkv_objs is a count of the objects in the kvfree_rcu page cache.
Accessing it requires holding the ->lock.  Switch to READ_ONCE() and
WRITE_ONCE() macros to provide lockless access to this counter.
This lockless access is used for the shrinker.

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