]> git.baikalelectronics.ru Git - kernel.git/commit
proc: simpler iterations for /proc/*/cmdline
authorAlexey Dobriyan <adobriyan@gmail.com>
Fri, 8 Jun 2018 00:09:59 +0000 (17:09 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Jun 2018 00:34:38 +0000 (17:34 -0700)
commita0b61370a66b9325ac7309e9f5d5591e92fcd472
tree8285d47f902f9b925101404b84a38a83f3dfeefd
parent0df4e94c0d1dae99ead36651ec937cbb57adbce6
proc: simpler iterations for /proc/*/cmdline

"rv" variable is used both as a counter of bytes transferred and an
error value holder but it can be reduced solely to error values if
original start of userspace buffer is stashed and used at the very end.

[akpm@linux-foundation.org: simplify cleanup code]
Link: http://lkml.kernel.org/r/20180221193009.GA28678@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/base.c