mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 12:09:58 +00:00
block/nbd-client: nbd_co_send_request: fix return code
It's incorrect to return success rc >= 0 if we skip qio_channel_writev_all() call due to s->quit. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20170920124507.18841-4-vsementsov@virtuozzo.com> Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
9397067221
commit
a693437037
@ -161,6 +161,8 @@ static int nbd_co_send_request(BlockDriverState *bs,
|
|||||||
NULL) < 0) {
|
NULL) < 0) {
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
}
|
}
|
||||||
|
} else if (rc >= 0) {
|
||||||
|
rc = -EIO;
|
||||||
}
|
}
|
||||||
qio_channel_set_cork(s->ioc, false);
|
qio_channel_set_cork(s->ioc, false);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user