[PATCH] cgroup: Remove unnecessary call to strstrip()

From: Hao Lee
Date: Sat Jan 02 2021 - 21:55:03 EST


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

diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 5e9cb81c088a..8b3554c1113a 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -4774,8 +4774,6 @@ static ssize_t cgroup_threads_write(struct kernfs_open_file *of,
ssize_t ret;
bool locked;

- buf = strstrip(buf);
-
dst_cgrp = cgroup_kn_lock_live(of->kn, false);
if (!dst_cgrp)
return -ENODEV;
--
2.24.1