projects/linux·commit 64541d19

[PATCH] kill unushed __put_task_struct_cb

64541d19 · Eric W. Biederman <[email protected]> · 2006-04-14 12:43:15 -06:00

Somehow in the midst of dotting i's and crossing t's during
the merge up to rc1 we wound up keeping __put_task_struct_cb
when it should have been killed as it no longer has any users.
Sorry I probably should have caught this while it was
still in the -mm tree.

Having the old code there gets confusing when reading
through the code and trying to understand what is
happening.

Signed-off-by: Eric W. Biederman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
64541d19702cfdb7ea946fdc20faee849f6874b1
Parents
1f602454

Changes

2 files changed · +0 −7

FileStatusAddDelContent
include/linux/sched.hmodified+0−1View file
kernel/fork.cmodified+0−6View file

include/linux/sched.h

View file
diff --git a/include/linux/sched.h b/include/linux/sched.h
index e3539c1..b7d31e2 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -911,7 +911,6 @@ static inline int pid_alive(struct task_struct *p)
extern void free_task(struct task_struct *tsk);
#define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0)
-extern void __put_task_struct_cb(struct rcu_head *rhp);
extern void __put_task_struct(struct task_struct *t);
static inline void put_task_struct(struct task_struct *t)

kernel/fork.c

View file
diff --git a/kernel/fork.c b/kernel/fork.c
index 3384eb8..54b15f8 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -124,12 +124,6 @@ void __put_task_struct(struct task_struct *tsk)
free_task(tsk);
}
-void __put_task_struct_cb(struct rcu_head *rhp)
-{
- struct task_struct *tsk = container_of(rhp, struct task_struct, rcu);
- __put_task_struct(tsk);
-}
-
void __init fork_init(unsigned long mempages)
{
#ifndef __HAVE_ARCH_TASK_STRUCT_ALLOCATOR