summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorTony Asleson <tasleson@redhat.com>2017-09-06 14:25:57 +0800
committerBen Hutchings <ben@decadent.org.uk>2017-11-26 13:50:34 +0000
commit966bdee67c17bb741838b4e627ae7329e25a8114 (patch)
tree6d2b716dc4d46bf176d8c4924ae8b670a83cfe73 /kernel
parent94625d422095b7d28a024923d47fa4901d6bb0a3 (diff)
bcache: Correct return value for sysfs attach errors
commit 77fa100f27475d08a569b9d51c17722130f089e7 upstream. 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: Tony Asleson <tasleson@redhat.com> Acked-by: Coly Li <colyli@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions