Skip to content
  • Tejun Heo's avatar
    f6d7d049
    cgroup: factor out css_set_move_task() · f6d7d049
    Tejun Heo authored
    
    
    A task is associated and disassociated with its css_set in three
    places - during migration, after a new task is created and when a task
    exits.  The first is handled by cgroup_task_migrate() and the latter
    two are open-coded.
    
    These are similar operations and spreading them over multiple places
    makes it harder to follow and update.  This patch collects all task
    css_set [dis]association operations into css_set_move_task().
    
    While css_set_move_task() may check whether populated state needs to
    be updated when not strictly necessary, the behavior is essentially
    equivalent before and after this patch.
    
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    f6d7d049
    cgroup: factor out css_set_move_task()
    Tejun Heo authored
    
    
    A task is associated and disassociated with its css_set in three
    places - during migration, after a new task is created and when a task
    exits.  The first is handled by cgroup_task_migrate() and the latter
    two are open-coded.
    
    These are similar operations and spreading them over multiple places
    makes it harder to follow and update.  This patch collects all task
    css_set [dis]association operations into css_set_move_task().
    
    While css_set_move_task() may check whether populated state needs to
    be updated when not strictly necessary, the behavior is essentially
    equivalent before and after this patch.
    
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Loading