All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: lizefan@huawei.com, hannes@cmpxchg.org
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
	Tejun Heo <tj@kernel.org>
Subject: [PATCH 1/3] cgroup: cosmetic update to cgroup_taskset_add()
Date: Thu, 29 Dec 2016 17:11:13 -0500	[thread overview]
Message-ID: <20161229221115.31995-2-tj@kernel.org> (raw)
In-Reply-To: <20161229221115.31995-1-tj@kernel.org>

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>
---
 kernel/cgroup/cgroup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index d9d82e9..aed492e 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -1980,8 +1980,8 @@ static void cgroup_taskset_add(struct task_struct *task,
 	if (list_empty(&cset->mg_node))
 		list_add_tail(&cset->mg_node, &tset->src_csets);
 	if (list_empty(&cset->mg_dst_cset->mg_node))
-		list_move_tail(&cset->mg_dst_cset->mg_node,
-			       &tset->dst_csets);
+		list_add_tail(&cset->mg_dst_cset->mg_node,
+			      &tset->dst_csets);
 }
 
 /**
-- 
2.9.3


  reply	other threads:[~2016-12-29 22:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-29 22:11 [PATCHSET for-4.11] cgroup: avoid spurious identity ->*attach() invocations Tejun Heo
2016-12-29 22:11 ` Tejun Heo [this message]
2016-12-29 22:11 ` [PATCH 2/3] cgroup: track migration context in cgroup_mgctx Tejun Heo
2016-12-29 22:11 ` [PATCH 3/3] cgroup: call subsys->*attach() only for subsystems which are actually affected by migration Tejun Heo
2017-01-11 10:46 ` [PATCHSET for-4.11] cgroup: avoid spurious identity ->*attach() invocations Zefan Li
2017-01-11 10:46   ` Zefan Li
     [not found]   ` <58760D09.9010508-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-01-16  0:04     ` Tejun Heo
2017-01-16  0:04       ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161229221115.31995-2-tj@kernel.org \
    --to=tj@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.