[PATCH 1/3] sched/stats: Fix comment in sched_info_enqueue()

From: Kayra Cizmeci

Date: Sun Sep 27 2026 - 08:35:41 EST


The comment currently states that sched_info_enqueue() is
only called from enqueue_task(). This is wrong since
sched_info_enqueue() gets called from sched_info_depart() too.

Fix it by adding the information that sched_info_enqueue()
is called from sched_info_depart() too.

Signed-off-by: Kayra Cizmeci <kayracizmeci@xxxxxxxxx>
---
kernel/sched/stats.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/stats.h b/kernel/sched/stats.h
index ebe0a7765f98..aecca78acc1a 100644
--- a/kernel/sched/stats.h
+++ b/kernel/sched/stats.h
@@ -284,8 +284,8 @@ static void sched_info_arrive(struct rq *rq, struct task_struct *t)
}

/*
- * This function is only called from enqueue_task(), but also only updates
- * the timestamp if it is already not set. It's assumed that
+ * This function is only called from enqueue_task() and sched_info_depart(),
+ * but only updates the timestamp if it is already not set. It's assumed that
* sched_info_dequeue() will clear that stamp when appropriate.
*/
static inline void sched_info_enqueue(struct rq *rq, struct task_struct *t)
--
2.53.0