From: Hao Lee <haolee.swjtu@gmail.com>
To: tj@kernel.org
Cc: lizefan@huawei.com, hannes@cmpxchg.org, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org, haolee.swjtu@gmail.com
Subject: [PATCH] cgroup: Remove unnecessary call to strstrip()
Date: Tue, 8 Sep 2020 13:33:50 +0000 [thread overview]
Message-ID: <20200908133350.GA22979@haolee.github.io> (raw)
The string buf will be stripped in cgroup_procs_write_start() before it
is converted to int, so remove this unnecessary call to strstrip().
Signed-off-by: Hao Lee <haolee.swjtu@gmail.com>
---
kernel/cgroup/cgroup.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index b6714166106d..90ee7e73eb2e 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -4772,14 +4772,12 @@ static ssize_t cgroup_threads_write(struct kernfs_open_file *of,
{
struct cgroup *src_cgrp, *dst_cgrp;
struct task_struct *task;
ssize_t ret;
bool locked;
- buf = strstrip(buf);
-
dst_cgrp = cgroup_kn_lock_live(of->kn, false);
if (!dst_cgrp)
return -ENODEV;
task = cgroup_procs_write_start(buf, false, &locked);
ret = PTR_ERR_OR_ZERO(task);
--
2.24.1
next reply other threads:[~2020-09-08 15:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-08 13:33 Hao Lee [this message]
2020-10-01 14:46 ` [PATCH] cgroup: Remove unnecessary call to strstrip() Hao Lee
-- strict thread matches above, loose matches on Subject: below --
2021-01-03 2:50 Hao Lee
2021-01-14 12:44 ` Michal Koutný
2021-01-14 17:35 ` Daniel Jordan
2021-01-15 2:19 ` Hao Lee
2021-01-15 20:31 ` 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=20200908133350.GA22979@haolee.github.io \
--to=haolee.swjtu@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=tj@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox