]> git.baikalelectronics.ru Git - kernel.git/commit
null_blk: Fix zoned command return code
authorKeith Busch <kbusch@kernel.org>
Wed, 9 Oct 2019 15:38:13 +0000 (00:38 +0900)
committerJens Axboe <axboe@kernel.dk>
Thu, 10 Oct 2019 03:00:20 +0000 (21:00 -0600)
commit07e8e7812102746901e9926fec9dfa9d23acec52
tree2949c2de17ef47047ab7d6447c29c8b433fe3053
parent17b80bbe1bbc8b47a9b7ed9362562b9baf567116
null_blk: Fix zoned command return code

The return code from null_handle_zoned() sets the cmd->error value.
Returning OK status when an error occured overwrites the intended
cmd->error. Return the appropriate error code instead of setting the
error in the cmd.

Fixes: ae2198dca92568fd ("null_blk: create a helper for zoned devices")
Cc: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/null_blk_zoned.c