]> git.baikalelectronics.ru Git - kernel.git/commit
bcache: Fix an error code in bch_dump_read()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 3 Sep 2019 13:25:44 +0000 (21:25 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 3 Sep 2019 14:08:29 +0000 (08:08 -0600)
commitc92ab7ff1770ae9e6823ef268f58211766636740
tree4b94f032bb44096974c8a34a81d65be8af94e0b4
parentec782870e24568cef932a365953df2da9fdbf7c9
bcache: Fix an error code in bch_dump_read()

The copy_to_user() function returns the number of bytes remaining to be
copied, but the intention here was to return -EFAULT if the copy fails.

Fixes: d68fdab28ba2 ("bcache: A block layer cache")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/debug.c