Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed480f2b authored by Maciej S. Szmigiero's avatar Maciej S. Szmigiero Committed by Greg Kroah-Hartman
Browse files

block, bfq: return nbytes and not zero from struct cftype .write() method



commit fc8ebd01 upstream.

The value that struct cftype .write() method returns is then directly
returned to userspace as the value returned by write() syscall, so it
should be the number of bytes actually written (or consumed) and not zero.

Returning zero from write() syscall makes programs like /bin/echo or bash
spin.

Signed-off-by: default avatarMaciej S. Szmigiero <mail@maciej.szmigiero.name>
Fixes: e21b7a0b ("block, bfq: add full hierarchical scheduling and cgroups support")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fe806eb5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment