]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: fix strstrip() misuse
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Mon, 26 Oct 2009 23:49:36 +0000 (16:49 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 29 Oct 2009 14:39:25 +0000 (07:39 -0700)
commit2ab188c0c1a5f340a6af1917263d114f5d3e2ac1
tree0f14f3a2f242258d2d7a0ddb3025c308f666b7ee
parent1ef8aa1712d0eecf321abfb278514b7fb8a464a0
cgroup: fix strstrip() misuse

cgroup_write_X64() and cgroup_write_string() ignore the return value of
strstrip().  it makes small inconsistent behavior.

example:
=========================
 # cd /mnt/cgroup/hoge
 # cat memory.swappiness
 60
 # echo "59 " > memory.swappiness
 # cat memory.swappiness
 59
 # echo " 58" > memory.swappiness
 bash: echo: write error: Invalid argument

This patch fixes it.

Cc: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Paul Menage <menage@google.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/cgroup.c