[PATCH] remove __put_task_struct_cb export again

The patch '[PATCH] RCU signal handling' [1] added an export for
__put_task_struct_cb, a put_task_struct helper newly introduced in that
patch. But the put_task_struct couldn't be used modular previously as
__put_task_struct wasn't exported. There are not callers of it in modular
code, and it shouldn't be exported because we don't want drivers to hold
references to task_structs.

This patch removes the export and folds __put_task_struct into
__put_task_struct_cb as there's no other caller.

[1] http://www2.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e56d090310d7625ecb43a1eeebd479f04affb48b

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Christoph Hellwig and committed by Linus Torvalds 7cd9013b 27d162e2

+3 -9
-1
include/linux/sched.h
··· 892 } 893 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) 897 898 extern void __put_task_struct_cb(struct rcu_head *rhp);
··· 892 } 893 894 extern void free_task(struct task_struct *tsk); 895 #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) 896 897 extern void __put_task_struct_cb(struct rcu_head *rhp);
+3 -1
kernel/fork.c
··· 108 } 109 EXPORT_SYMBOL(free_task); 110 111 - void __put_task_struct(struct task_struct *tsk) 112 { 113 WARN_ON(!(tsk->exit_state & (EXIT_DEAD | EXIT_ZOMBIE))); 114 WARN_ON(atomic_read(&tsk->usage)); 115 WARN_ON(tsk == current);
··· 108 } 109 EXPORT_SYMBOL(free_task); 110 111 + void __put_task_struct_cb(struct rcu_head *rhp) 112 { 113 + struct task_struct *tsk = container_of(rhp, struct task_struct, rcu); 114 + 115 WARN_ON(!(tsk->exit_state & (EXIT_DEAD | EXIT_ZOMBIE))); 116 WARN_ON(atomic_read(&tsk->usage)); 117 WARN_ON(tsk == current);
-7
kernel/sched.c
··· 178 #define task_hot(p, now, sd) ((long long) ((now) - (p)->last_ran) \ 179 < (long long) (sd)->cache_hot_time) 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 /* 189 * These are the runqueue data structures: 190 */
··· 178 #define task_hot(p, now, sd) ((long long) ((now) - (p)->last_ran) \ 179 < (long long) (sd)->cache_hot_time) 180 181 /* 182 * These are the runqueue data structures: 183 */