[PATCH 05/11] sched/fair: Add missing annotation for nohz_newidle_balance()
From: Jules Irenge
Date: Sun Feb 09 2020 - 17:37:56 EST
Sparse reports a warning at nohz_newidle_balance()
warning: context imbalance in nohz_newidle_balance() - wrong count at exit
The root cause is a missing annotation
Add the missing __must_hold(this_rq->lock)
Signed-off-by: Jules Irenge <jbi.octave@xxxxxxxxx>
---
kernel/sched/fair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index fe4e0d775375..81f8a440469a 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -10050,7 +10050,7 @@ static bool nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle)
return true;
}
-static void nohz_newidle_balance(struct rq *this_rq)
+static void nohz_newidle_balance(struct rq *this_rq) __must_hold(&this_rq->lock)
{
int this_cpu = this_rq->cpu;
--
2.24.1