Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1666389
| From | Davidlohr Bueso <dave@stgolabs.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] sched: Drop try_get_task_struct() |
| Date | 2017-06-15 04:40 +0200 |
| Message-ID | <tSsRs-52d-15@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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 <oleg@redhat.com>
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
---
include/linux/sched/task.h | 2 --
kernel/exit.c | 13 -------------
2 files changed, 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)
}
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;
diff --git a/kernel/exit.c b/kernel/exit.c
index d0a34e1e4ec1..0479eb8b4985 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -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
--
2.12.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] sched: Drop try_get_task_struct() Davidlohr Bueso <dave@stgolabs.net> - 2017-06-15 04:40 +0200
csiph-web