sched: Drop try_get_task_struct()
PATCH 1/1 sched: Drop try_get_task_struct()
This function was introduced by 150593b (sched/api: Introduce task_rcu_dereference() and try_get_task_struct()), to allow easier usage of task_rcu_dereference(), however no users were ever added. Drop the helper.
Cc Oleg Nesterov <[email protected]>
Signed-off-by Davidlohr Bueso <[email protected]>
--- include/linux/sched/task.h | 2 -- kernel/exit.c | 13 ------------- 2 files changed, 15 deletions(-)
include/linux/sched/task.h +0 -2
@@ -95,8 +95,6 @@ static inline void put_task_struct(struct task_struct *t) }struct task_struct *task_rcu_dereference (struct task_struct **ptask); -struct task_struct *try_get_task_struct (struct task_struct **ptask); -#ifdef CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT extern int arch_task_struct_size__read_mostly ;
kernel/exit.c +0 -13
@@ -317,19 +317,6 @@ void rcuwait_wake_up(struct rcuwait *w)rcu_read_unlock (); } -struct task_struct *try_get_task_struct (struct task_struct **ptask) -{ -struct task_struct *task; - -rcu_read_lock (); - task =task_rcu_dereference (ptask); -if (task) -get_task_struct (task); -rcu_read_unlock (); - -return task; -} -/* * Determine if a process group is "orphaned", according to the POSIX * definition in 2.2.2.52. Orphaned process groups are not to be affected
Signature · 1 line
2.12.0
tip-bot for Davidlohr Bueso
merge bot[tip:sched/core] sched/core: Drop the unused try_get_task_struct() helper function
sched/core: Drop the unused try_get_task_struct() helper function
Commit-ID: f11cc0760b8397e0d230122606421b6a96e9f869 Gitweb: http://git.kernel.org/tip/f11cc0760b8397e0d230122606421b6a96e9f869 Author: Davidlohr Bueso <[email protected]> AuthorDate: Wed, 14 Jun 2017 19:37:30 -0700 Committer: Ingo Molnar <[email protected]> CommitDate: Tue, 20 Jun 2017 12:48:37 +0200
sched/core: Drop the unused try_get_task_struct() helper function
This function was introduced by:
150593bf8693 ("sched/api: Introduce task_rcu_dereference() and try_get_task_struct()")
... to allow easier usage of task_rcu_dereference(), however no users were ever added. Drop the helper.
Signed-off-by Davidlohr Bueso <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Oleg Nesterov <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Signed-off-by Ingo Molnar <[email protected]>
--- include/linux/sched/task.h | 2 -- kernel/exit.c | 13 ------------- 2 files changed, 15 deletions(-)
include/linux/sched/task.h +0 -2
@@ -95,8 +95,6 @@ static inline void put_task_struct(struct task_struct *t) }struct task_struct *task_rcu_dereference (struct task_struct **ptask); -struct task_struct *try_get_task_struct (struct task_struct **ptask); -#ifdef CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT extern int arch_task_struct_size__read_mostly ;
kernel/exit.c +0 -13
@@ -318,19 +318,6 @@ void rcuwait_wake_up(struct rcuwait *w)rcu_read_unlock (); } -struct task_struct *try_get_task_struct (struct task_struct **ptask) -{ -struct task_struct *task; - -rcu_read_lock (); - task =task_rcu_dereference (ptask); -if (task) -get_task_struct (task); -rcu_read_unlock (); - -return task; -} -/* * Determine if a process group is "orphaned", according to the POSIX * definition in 2.2.2.52. Orphaned process groups are not to be affected