Skip to content
Commit 77fa100f authored by Tony Asleson's avatar Tony Asleson Committed by Jens Axboe
Browse files

bcache: Correct return value for sysfs attach errors



If you encounter any errors in bch_cached_dev_attach it will return
a negative error code.  The variable 'v' which stores the result is
unsigned, thus user space sees a very large value returned for bytes
written which can cause incorrect user space behavior.  Utilize 1
signed variable to use throughout the function to preserve error return
capability.

Signed-off-by: default avatarTony Asleson <tasleson@redhat.com>
Acked-by: default avatarColy Li <colyli@suse.de>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent a8394090
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment