Re: [PATCH] sched: cgroup: Move task_can_attach() to cpuset.c
From: Tejun Heo
Date: Fri Oct 03 2025 - 17:38:18 EST
On Fri, Oct 03, 2025 at 12:14:21PM -0400, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@xxxxxxxxxxx>
>
> At our monthly stable meeting, we were talking about documenting non
> static functions and randomly picked a function to look at. That was
> task_can_attach(). It was then noticed that it's only used by
> cgroup/cpuset.c and nothing else. It's a simple function that doesn't
> reference anything unique to sched/core.c, hence there's no reason that
> function should be there.
>
> Move it to cgroup/cpuset.c as that's the only place it is used. Also make
> it a static inline as it is so small.
>
> Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
Peter, if it looks good to you, I can route it through cgroup tree.
Thanks.
--
tejun