sysfs: skip bin_buffer->buffer while reading
authorTejun Heo <tj@kernel.org>
Tue, 1 Oct 2013 21:42:03 +0000 (17:42 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 6 Oct 2013 00:27:40 +0000 (17:27 -0700)
commit91270162bf8a86bee756da7e931591d9953cb5a8
tree086f17394395fdaadd0ddbc3761a3115c9c032c2
parent13c589d5b0ac654d9da7e490a2dd548e6b86b4a5
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