virtio-blk: Handle immediate flush failure properly

Fix virtio-blk to use the usual completion path that involves werror handling
instead of directly completing the request in cases where bdrv_aio_flush
returns NULL.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
master
Kevin Wolf 2010-10-27 13:10:15 +02:00
parent b2df7531f3
commit 18a8d4214b
1 changed files with 1 additions and 1 deletions

View File

@ -273,7 +273,7 @@ static void virtio_blk_handle_flush(VirtIOBlockReq *req, MultiReqBuffer *mrb)
acb = bdrv_aio_flush(req->dev->bs, virtio_blk_flush_complete, req);
if (!acb) {
virtio_blk_req_complete(req, VIRTIO_BLK_S_IOERR);
virtio_blk_flush_complete(req, -EIO);
}
}