Skip to content
Commit 7c75661c authored by Ming Lei's avatar Ming Lei Committed by Jens Axboe
Browse files

ublk: don't return 0 in case of any failure

Commit 2d786e66 ("block: ublk: switch to ioctl command encoding")
starts to reset local variable of 'ret' as zero, then if any failure
happens when handling the three IO commands, 0 can be returned to ublk
server.

Fix it by returning -EINVAL in case of command handling failure.

Cc: Christoph Hellwig <hch@lst.de>
Fixes: 2d786e66

 ("block: ublk: switch to ioctl command encoding")
Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20230420091104.1092972-1-ming.lei@redhat.com
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 9e05a259
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment