diff options
author | Tony Asleson <tasleson@redhat.com> | 2017-09-06 09:25:57 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-09-27 15:43:21 +0300 |
commit | bf8702bf049edbc0b2a1c900473523f582d24706 (patch) | |
tree | ff30c8022029aa7c431074f55ac00a5e2c43099c /lib/mpi/mpiutil.c | |
parent | 2e014a348ffce5c0a2a3a9e2f93a52f66f6cc315 (diff) | |
download | linux-bf8702bf049edbc0b2a1c900473523f582d24706.tar.xz |
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions