diff options
author | Tejun Heo <tj@kernel.org> | 2017-01-15 19:03:40 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2017-01-15 19:03:40 -0500 |
commit | d8ebf5191d7fdf81ba34a7c3d726b99c34918030 (patch) | |
tree | 8ba39812b78dc8bc828122fc36492e8c8c99b319 /kernel/cgroup | |
parent | 20c56e595cd781b5305562c9bf8289d8d5e47c63 (diff) |
cgroup: cosmetic update to cgroup_taskset_add()
cgroup_taskset_add() was using list_add_tail() when for source csets
but list_move_tail() for destination. As the operations are gated by
list_empty() test, list_move_tail() is equivalent to list_add_tail()
here. Use list_add_tail() too for destination csets too.
This doesn't cause any functional changes.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Zefan Li <lizefan@huawei.com>
Diffstat (limited to 'kernel/cgroup')
-rw-r--r-- | kernel/cgroup/cgroup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index d9d82e96d67f..aed492e907c1 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c | |||
@@ -1980,8 +1980,8 @@ static void cgroup_taskset_add(struct task_struct *task, | |||
1980 | if (list_empty(&cset->mg_node)) | 1980 | if (list_empty(&cset->mg_node)) |
1981 | list_add_tail(&cset->mg_node, &tset->src_csets); | 1981 | list_add_tail(&cset->mg_node, &tset->src_csets); |
1982 | if (list_empty(&cset->mg_dst_cset->mg_node)) | 1982 | if (list_empty(&cset->mg_dst_cset->mg_node)) |
1983 | list_move_tail(&cset->mg_dst_cset->mg_node, | 1983 | list_add_tail(&cset->mg_dst_cset->mg_node, |
1984 | &tset->dst_csets); | 1984 | &tset->dst_csets); |
1985 | } | 1985 | } |
1986 | 1986 | ||
1987 | /** | 1987 | /** |