sched: Remove unused tryget_task_struct()
PATCH 1/1 sched: Remove unused tryget_task_struct()
tryget_task_struct() was added for sched_ext by commit a8532fac7b5d ("sched_ext: TASK_DEAD tasks must be switched into SCX on ops_enable"). All of its users in sched_ext were subsequently converted to get_task_struct() by commit fbe3fb103596 ("sched_ext: Replace tryget_task_struct() with get_task_struct()"), leaving the helper with no callers.
Remove the now-unused helper. No functional change.
--- include/linux/sched/task.h | 5 ----- 1 file changed, 5 deletions(-)
include/linux/sched/task.h +0 -5
@@ -117,11 +117,6 @@ static inline struct task_struct *get_task_struct(struct task_struct *t)return t; } -static inline struct task_struct *tryget_task_struct (struct task_struct *t) -{ -return refcount_inc_not_zero (&t->usage) ? t :NULL ; -} -extern void __put_task_struct (struct task_struct *t);extern void __put_task_struct_rcu_cb (struct rcu_head *rhp);
Signature · 1 line
2.43.0
Quoted 10 lines · Zhan Xusheng
tryget_task_struct()was added forsched_extby commita8532fac7b5d("sched_ext:TASK_DEADtasks must be switched into SCX onops_enable"). All of its users insched_extwere subsequently converted toget_task_struct()by commitfbe3fb103596("sched_ext: Replacetryget_task_struct()withget_task_struct()"), leaving the helper with no callers.Remove the now-unused helper. No functional change.
Signed-off-by Zhan Xusheng <[email protected]>
Thanks.
Signature · 1 line
tejun
Quoted 11 lines · Zhan Xusheng
tryget_task_struct()was added forsched_extby commita8532fac7b5d("sched_ext:TASK_DEADtasks must be switched into SCX onops_enable"). All of its users insched_extwere subsequently converted toget_task_struct()by commitfbe3fb103596("sched_ext: Replacetryget_task_struct()withget_task_struct()"), leaving the helper with no callers.Remove the now-unused helper. No functional change.
Signed-off-by Zhan Xusheng <[email protected]>