Remove code comment assumptions in favor of lockdep assertions.
Signed-off-by: Jon Kohler <jon@nutanix.com>
---
kernel/sched/rt.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 172c588de542..2b10c930620e 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -2407,9 +2407,10 @@ static void task_woken_rt(struct rq *rq, struct task_struct *p)
push_rt_tasks(rq);
}
-/* Assumes rq->lock is held */
static void rq_online_rt(struct rq *rq)
{
+ lockdep_assert_rq_held(rq);
+
if (rq->rt.overloaded)
rt_set_overload(rq);
@@ -2418,9 +2419,10 @@ static void rq_online_rt(struct rq *rq)
cpupri_set(&rq->rd->cpupri, rq->cpu, rq->rt.highest_prio.curr);
}
-/* Assumes rq->lock is held */
static void rq_offline_rt(struct rq *rq)
{
+ lockdep_assert_rq_held(rq);
+
if (rq->rt.overloaded)
rt_clear_overload(rq);
--
2.43.0