diff options
author | Davidlohr Bueso <dave@stgolabs.net> | 2017-06-14 22:37:30 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-06-20 06:48:37 -0400 |
commit | f11cc0760b8397e0d230122606421b6a96e9f869 (patch) | |
tree | 64bdf2282b63dff6d2a5203376d5c640cc234f28 | |
parent | 902b31941327a0e9c0ca9eb7750414ae41bf8a89 (diff) |
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 <dbueso@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: dave@stgolabs.net
Link: http://lkml.kernel.org/r/20170615023730.22827-1-dave@stgolabs.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | include/linux/sched/task.h | 2 | ||||
-rw-r--r-- | kernel/exit.c | 13 |
2 files changed, 0 insertions, 15 deletions
diff --git a/include/linux/sched/task.h b/include/linux/sched/task.h index a978d7189cfd..f0f065c5afcf 100644 --- a/include/linux/sched/task.h +++ b/include/linux/sched/task.h | |||
@@ -95,8 +95,6 @@ static inline void put_task_struct(struct task_struct *t) | |||
95 | } | 95 | } |
96 | 96 | ||
97 | struct task_struct *task_rcu_dereference(struct task_struct **ptask); | 97 | struct task_struct *task_rcu_dereference(struct task_struct **ptask); |
98 | struct task_struct *try_get_task_struct(struct task_struct **ptask); | ||
99 | |||
100 | 98 | ||
101 | #ifdef CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT | 99 | #ifdef CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT |
102 | extern int arch_task_struct_size __read_mostly; | 100 | extern int arch_task_struct_size __read_mostly; |
diff --git a/kernel/exit.c b/kernel/exit.c index 7d694437ab44..c63226283aef 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -318,19 +318,6 @@ void rcuwait_wake_up(struct rcuwait *w) | |||
318 | rcu_read_unlock(); | 318 | rcu_read_unlock(); |
319 | } | 319 | } |
320 | 320 | ||
321 | struct task_struct *try_get_task_struct(struct task_struct **ptask) | ||
322 | { | ||
323 | struct task_struct *task; | ||
324 | |||
325 | rcu_read_lock(); | ||
326 | task = task_rcu_dereference(ptask); | ||
327 | if (task) | ||
328 | get_task_struct(task); | ||
329 | rcu_read_unlock(); | ||
330 | |||
331 | return task; | ||
332 | } | ||
333 | |||
334 | /* | 321 | /* |
335 | * Determine if a process group is "orphaned", according to the POSIX | 322 | * Determine if a process group is "orphaned", according to the POSIX |
336 | * definition in 2.2.2.52. Orphaned process groups are not to be affected | 323 | * definition in 2.2.2.52. Orphaned process groups are not to be affected |