diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2011-03-23 16:42:45 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-23 19:46:34 -0700 |
commit | 9303e0c4814d2a6afca878cc35433291e862169c (patch) | |
tree | 786866f6f0639edcc2996d4157ea7128b2400898 /tools | |
parent | f9434ad1552427fab49336e1a6e3ef121895b9d1 (diff) | |
download | linux-9303e0c4814d2a6afca878cc35433291e862169c.tar.gz linux-9303e0c4814d2a6afca878cc35433291e862169c.tar.bz2 linux-9303e0c4814d2a6afca878cc35433291e862169c.zip |
cpuset: remove unneeded NODEMASK_ALLOC() in cpuset_sprintf_memlist()
It's not necessary to copy cpuset->mems_allowed to a buffer allocated by
NODEMASK_ALLOC(). Just pass it to nodelist_scnprintf().
As spotted by Paul, a side effect is we fix a bug that the function can
return -ENOMEM but the caller doesn't expect negative return value.
Therefore change the return value of cpuset_sprintf_cpulist() and
cpuset_sprintf_memlist() from int to size_t.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Paul Menage <menage@google.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions