diff options
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index bd2959228871..466531eb92cc 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -426,6 +426,7 @@ static struct mm_struct * mm_init(struct mm_struct * mm, struct task_struct *p) | |||
426 | init_rwsem(&mm->mmap_sem); | 426 | init_rwsem(&mm->mmap_sem); |
427 | INIT_LIST_HEAD(&mm->mmlist); | 427 | INIT_LIST_HEAD(&mm->mmlist); |
428 | mm->flags = (current->mm) ? current->mm->flags : default_dump_filter; | 428 | mm->flags = (current->mm) ? current->mm->flags : default_dump_filter; |
429 | mm->oom_adj = (current->mm) ? current->mm->oom_adj : 0; | ||
429 | mm->core_state = NULL; | 430 | mm->core_state = NULL; |
430 | mm->nr_ptes = 0; | 431 | mm->nr_ptes = 0; |
431 | set_mm_counter(mm, file_rss, 0); | 432 | set_mm_counter(mm, file_rss, 0); |
@@ -1268,6 +1269,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1268 | write_unlock_irq(&tasklist_lock); | 1269 | write_unlock_irq(&tasklist_lock); |
1269 | proc_fork_connector(p); | 1270 | proc_fork_connector(p); |
1270 | cgroup_post_fork(p); | 1271 | cgroup_post_fork(p); |
1272 | perf_counter_fork(p); | ||
1271 | return p; | 1273 | return p; |
1272 | 1274 | ||
1273 | bad_fork_free_pid: | 1275 | bad_fork_free_pid: |
@@ -1407,12 +1409,6 @@ long do_fork(unsigned long clone_flags, | |||
1407 | if (clone_flags & CLONE_VFORK) { | 1409 | if (clone_flags & CLONE_VFORK) { |
1408 | p->vfork_done = &vfork; | 1410 | p->vfork_done = &vfork; |
1409 | init_completion(&vfork); | 1411 | init_completion(&vfork); |
1410 | } else if (!(clone_flags & CLONE_VM)) { | ||
1411 | /* | ||
1412 | * vfork will do an exec which will call | ||
1413 | * set_task_comm() | ||
1414 | */ | ||
1415 | perf_counter_fork(p); | ||
1416 | } | 1412 | } |
1417 | 1413 | ||
1418 | audit_finish_fork(p); | 1414 | audit_finish_fork(p); |