aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi/scsi-bus.c
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2014-09-24 16:27:55 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2014-09-30 13:30:51 +0200
commita83cfd12d9868b6732e3c6e5b2cbd69a2e0ab689 (patch)
tree9df0c0f8fa533ba608e654dbc0b545d48266d2df /hw/scsi/scsi-bus.c
parent3df9caf88f5c0859ae380101fea47609ba1dbfbd (diff)
scsi: Drop SCSIReqOps.cancel_io
The only two implementations are identical to each other, with nothing specific to device: they only call bdrv_aio_cancel with the SCSIRequest.aiocb. Let's move it to scsi-bus. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi/scsi-bus.c')
-rw-r--r--hw/scsi/scsi-bus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index f90a2040a8..764f6cf3b5 100644
--- a/hw/scsi/scsi-bus.c
+++ b/hw/scsi/scsi-bus.c
@@ -1727,8 +1727,8 @@ void scsi_req_cancel(SCSIRequest *req)
scsi_req_ref(req);
scsi_req_dequeue(req);
req->io_canceled = true;
- if (req->ops->cancel_io) {
- req->ops->cancel_io(req);
+ if (req->aiocb) {
+ bdrv_aio_cancel(req->aiocb);
}
if (req->bus->info->cancel) {
req->bus->info->cancel(req);