[PATCH 16/18] rcu/tree: Remove extra next variable in kfree worker function

From: Joel Fernandes (Google)
Date: Sun Mar 29 2020 - 22:34:06 EST


No change in code, small refactor.

Signed-off-by: Joel Fernandes (Google) <joel@xxxxxxxxxxxxxxxxx>
---
kernel/rcu/tree.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 204292378101b..56c9e102a901d 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -2889,8 +2889,7 @@ debug_rcu_bhead_unqueue(struct kvfree_rcu_bulk_data *bhead)
static void kfree_rcu_work(struct work_struct *work)
{
unsigned long flags;
- struct kvfree_rcu_bulk_data *bkhead, *bknext;
- struct kvfree_rcu_bulk_data *bvhead, *bvnext;
+ struct kvfree_rcu_bulk_data *bkhead, *bvhead, *bnext;
struct rcu_head *head, *next;
struct kfree_rcu_cpu *krcp;
struct kfree_rcu_cpu_work *krwp;
@@ -2915,8 +2914,8 @@ static void kfree_rcu_work(struct work_struct *work)
spin_unlock_irqrestore(&krcp->lock, flags);

/* kmalloc()/kfree() channel. */
- for (; bkhead; bkhead = bknext) {
- bknext = bkhead->next;
+ for (; bkhead; bkhead = bnext) {
+ bnext = bkhead->next;

debug_rcu_bhead_unqueue(bkhead);

@@ -2934,8 +2933,8 @@ static void kfree_rcu_work(struct work_struct *work)
}

/* vmalloc()/vfree() channel. */
- for (; bvhead; bvhead = bvnext) {
- bvnext = bvhead->next;
+ for (; bvhead; bvhead = bnext) {
+ bnext = bvhead->next;

debug_rcu_bhead_unqueue(bvhead);

--
2.26.0.rc2.310.g2932bb562d-goog