Re: [PATCH v25 8/9] sched: Move attach_one_task and attach_task helpers to sched.h
From: K Prateek Nayak
Date: Sun Mar 15 2026 - 12:35:04 EST
Hello John,
On 3/13/2026 8:00 AM, John Stultz wrote:
> +/*
> + * attach_one_task() -- attaches the task returned from detach_one_task() to
> + * its new rq.
> + */
> +static inline void attach_one_task(struct rq *rq, struct task_struct *p)
> +{
> + struct rq_flags rf;
> +
> + rq_lock(rq, &rf);
nit. We can now use guard(rq_lock)(rq) and save on needing to declare a
"rf". Apart from that, feel free to include:
Reviewed-by: K Prateek Nayak <kprateek.nayak@xxxxxxx>
> + update_rq_clock(rq);
> + attach_task(rq, p);
> + rq_unlock(rq, &rf);
> +}
> +
--
Thanks and Regards,
Prateek