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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ping. Thanks.

On Tue, Sep 08, 2020 at 01:33:50PM +0000, Hao Lee wrote:
> 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 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
> 



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux