diff options
author | Uladzislau Rezki (Sony) <urezki@gmail.com> | 2021-04-15 19:20:00 +0200 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2021-05-10 16:00:48 -0700 |
commit | 7fe1da33f6bad33b79135b1df6c3476f87856928 (patch) | |
tree | 665c7e82da7826d4b5b676a607097f4654c4767c /kernel | |
parent | dd28c9f057ad099f6221829053e48f331e6f0b7f (diff) | |
download | linux-stable-7fe1da33f6bad33b79135b1df6c3476f87856928.tar.gz linux-stable-7fe1da33f6bad33b79135b1df6c3476f87856928.tar.bz2 linux-stable-7fe1da33f6bad33b79135b1df6c3476f87856928.zip |
kvfree_rcu: Use kfree_rcu_monitor() instead of open-coded variant
Replace an open-coded version of the kfree_rcu_monitor() function body
with a call to that function.
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rcu/tree.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 1ae5f88e475f..d643fd8327b6 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -3697,7 +3697,6 @@ static unsigned long kfree_rcu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) { int cpu, freed = 0; - unsigned long flags; for_each_possible_cpu(cpu) { int count; @@ -3705,12 +3704,7 @@ kfree_rcu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) count = krcp->count; count += drain_page_cache(krcp); - - raw_spin_lock_irqsave(&krcp->lock, flags); - if (krcp->monitor_todo) - kfree_rcu_drain_unlock(krcp, flags); - else - raw_spin_unlock_irqrestore(&krcp->lock, flags); + kfree_rcu_monitor(&krcp->monitor_work.work); sc->nr_to_scan -= count; freed += count; |