diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/exit.c | 7 | ||||
-rw-r--r-- | kernel/fork.c | 3 |
2 files changed, 1 insertions, 9 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index e76bd02e930e..304ef637be6c 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -137,12 +137,8 @@ void release_task(struct task_struct * p) | |||
137 | { | 137 | { |
138 | int zap_leader; | 138 | int zap_leader; |
139 | task_t *leader; | 139 | task_t *leader; |
140 | struct dentry *proc_dentry; | ||
141 | |||
142 | repeat: | 140 | repeat: |
143 | atomic_dec(&p->user->processes); | 141 | atomic_dec(&p->user->processes); |
144 | spin_lock(&p->proc_lock); | ||
145 | proc_dentry = proc_pid_unhash(p); | ||
146 | write_lock_irq(&tasklist_lock); | 142 | write_lock_irq(&tasklist_lock); |
147 | ptrace_unlink(p); | 143 | ptrace_unlink(p); |
148 | BUG_ON(!list_empty(&p->ptrace_list) || !list_empty(&p->ptrace_children)); | 144 | BUG_ON(!list_empty(&p->ptrace_list) || !list_empty(&p->ptrace_children)); |
@@ -171,8 +167,7 @@ repeat: | |||
171 | 167 | ||
172 | sched_exit(p); | 168 | sched_exit(p); |
173 | write_unlock_irq(&tasklist_lock); | 169 | write_unlock_irq(&tasklist_lock); |
174 | spin_unlock(&p->proc_lock); | 170 | proc_flush_task(p); |
175 | proc_pid_flush(proc_dentry); | ||
176 | release_thread(p); | 171 | release_thread(p); |
177 | call_rcu(&p->rcu, delayed_put_task_struct); | 172 | call_rcu(&p->rcu, delayed_put_task_struct); |
178 | 173 | ||
diff --git a/kernel/fork.c b/kernel/fork.c index dfd10cb370c3..79e91046f36e 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -993,13 +993,10 @@ static task_t *copy_process(unsigned long clone_flags, | |||
993 | if (put_user(p->pid, parent_tidptr)) | 993 | if (put_user(p->pid, parent_tidptr)) |
994 | goto bad_fork_cleanup; | 994 | goto bad_fork_cleanup; |
995 | 995 | ||
996 | p->proc_dentry = NULL; | ||
997 | |||
998 | INIT_LIST_HEAD(&p->children); | 996 | INIT_LIST_HEAD(&p->children); |
999 | INIT_LIST_HEAD(&p->sibling); | 997 | INIT_LIST_HEAD(&p->sibling); |
1000 | p->vfork_done = NULL; | 998 | p->vfork_done = NULL; |
1001 | spin_lock_init(&p->alloc_lock); | 999 | spin_lock_init(&p->alloc_lock); |
1002 | spin_lock_init(&p->proc_lock); | ||
1003 | 1000 | ||
1004 | clear_tsk_thread_flag(p, TIF_SIGPENDING); | 1001 | clear_tsk_thread_flag(p, TIF_SIGPENDING); |
1005 | init_sigpending(&p->pending); | 1002 | init_sigpending(&p->pending); |