sysfs: skip bin_buffer->buffer while reading
authorTejun Heo <tj@kernel.org>
Tue, 1 Oct 2013 21:42:03 +0000 (17:42 -0400)
committerMaciej Wereski <m.wereski@partner.samsung.com>
Tue, 9 Jun 2015 09:31:13 +0000 (11:31 +0200)
commite5e118613efadaadecbbf95deb5f488b0b1b84cc
tree4377cc449fdc7e120cf4e51be3084955195058e3
parent7d5bfa098853a99bde5e9a1eeb5d146dfcddc42d
sysfs: skip bin_buffer->buffer while reading

After b31ca3f5dfc ("sysfs: fix deadlock"), bin read() first writes
data to bb->buffer and bounces it to a transient kernel buffer which
is then copied out to userland.  The double bouncing doesn't add
anything.  Let's just use the transient buffer directly.

While at it, rename @temp to @buf for clarity.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/sysfs/bin.c