diff options
-rw-r--r-- | include/linux/sched.h | 1 | ||||
-rw-r--r-- | kernel/fork.c | 4 | ||||
-rw-r--r-- | kernel/sched.c | 7 |
3 files changed, 3 insertions, 9 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index ff2e09c953b9..62e6314382f0 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -892,7 +892,6 @@ static inline int pid_alive(struct task_struct *p) | |||
892 | } | 892 | } |
893 | 893 | ||
894 | extern void free_task(struct task_struct *tsk); | 894 | extern void free_task(struct task_struct *tsk); |
895 | extern void __put_task_struct(struct task_struct *tsk); | ||
896 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) | 895 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) |
897 | 896 | ||
898 | extern void __put_task_struct_cb(struct rcu_head *rhp); | 897 | extern void __put_task_struct_cb(struct rcu_head *rhp); |
diff --git a/kernel/fork.c b/kernel/fork.c index fbea12d7a943..a8eab86de7f1 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -108,8 +108,10 @@ void free_task(struct task_struct *tsk) | |||
108 | } | 108 | } |
109 | EXPORT_SYMBOL(free_task); | 109 | EXPORT_SYMBOL(free_task); |
110 | 110 | ||
111 | void __put_task_struct(struct task_struct *tsk) | 111 | void __put_task_struct_cb(struct rcu_head *rhp) |
112 | { | 112 | { |
113 | struct task_struct *tsk = container_of(rhp, struct task_struct, rcu); | ||
114 | |||
113 | WARN_ON(!(tsk->exit_state & (EXIT_DEAD | EXIT_ZOMBIE))); | 115 | WARN_ON(!(tsk->exit_state & (EXIT_DEAD | EXIT_ZOMBIE))); |
114 | WARN_ON(atomic_read(&tsk->usage)); | 116 | WARN_ON(atomic_read(&tsk->usage)); |
115 | WARN_ON(tsk == current); | 117 | WARN_ON(tsk == current); |
diff --git a/kernel/sched.c b/kernel/sched.c index e82c99f1db64..4d46e90f59c3 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -178,13 +178,6 @@ static unsigned int task_timeslice(task_t *p) | |||
178 | #define task_hot(p, now, sd) ((long long) ((now) - (p)->last_ran) \ | 178 | #define task_hot(p, now, sd) ((long long) ((now) - (p)->last_ran) \ |
179 | < (long long) (sd)->cache_hot_time) | 179 | < (long long) (sd)->cache_hot_time) |
180 | 180 | ||
181 | void __put_task_struct_cb(struct rcu_head *rhp) | ||
182 | { | ||
183 | __put_task_struct(container_of(rhp, struct task_struct, rcu)); | ||
184 | } | ||
185 | |||
186 | EXPORT_SYMBOL_GPL(__put_task_struct_cb); | ||
187 | |||
188 | /* | 181 | /* |
189 | * These are the runqueue data structures: | 182 | * These are the runqueue data structures: |
190 | */ | 183 | */ |