]> git.baikalelectronics.ru Git - kernel.git/commit
nbd: set rq->errors to actual error code
authorJosef Bacik <jbacik@fb.com>
Fri, 24 Mar 2017 18:08:27 +0000 (14:08 -0400)
committerJens Axboe <axboe@fb.com>
Fri, 24 Mar 2017 21:42:47 +0000 (15:42 -0600)
commit7959a5c87c9267072a10a40d7a6605fc5f6c587f
tree8c631a5f19867d1f327331ed4d5827f1ebc70281
parenta90693d27e39acf65fba8953136afe8e631a7c8c
nbd: set rq->errors to actual error code

We've been relying on the block layer to assume rq->errors being set
translates into -EIO.  I noticed in testing that sometimes this isn't
true, and really there's not much of a reason to have a counter instead
of just using -EIO.  So set it properly so we don't leak random numbers
to unsuspecting victims.

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/nbd.c