Skip to content
Commit 3f418548 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds
Browse files

fs/exec.c:de_thread(): use change_pid() rather than detach_pid/attach_pid



de_thread() can use change_pid() instead of detach + attach.  This looks
better and this ensures that, say, next_thread() can never see a task with
->pid == NULL.

Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Acked-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Sergey Dyasly <dserrg@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 888ffc59
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment