• Oleg Nesterov's avatar
    exit: reparent: cleanup the usage of reparent_leader() · 2831096e
    Oleg Nesterov authored
    1. Now that reparent_leader() doesn't abuse ->sibling we can shift
       list_move_tail() from reparent_leader() to forget_original_parent()
       and turn it into a single list_splice_tail_init(). This also makes
       BUG_ON(!list_empty()) and list_for_each_entry_safe() unnecessary.
    
    2. This also allows to shift the same_thread_group() check, it looks
       a bit more clear in the caller.
    Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
    Cc: Aaron Tomlin <atomlin@redhat.com>
    Cc: Alexey Dobriyan <adobriyan@gmail.com>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
    Cc: Sterling Alexander <stalexan@redhat.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Roland McGrath <roland@hack.frob.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    2831096e
exit.c 41.9 KB