summaryrefslogtreecommitdiffstats
path: root/hw/scsi
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-12-16 19:33:44 +0100
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:28:20 -0600
commit416124928135a39781e30934bbda2dd9b5a65d95 (patch)
treed41b1867558ded9c408af4f2f8f1e6f6a9e70e2c /hw/scsi
parent59af443d55f71437fb1e270099a15fe3bddfc735 (diff)
downloadhqemu-416124928135a39781e30934bbda2dd9b5a65d95.zip
hqemu-416124928135a39781e30934bbda2dd9b5a65d95.tar.gz
scsi: always call notifier on async cancellation
This was found by code inspection. If the request is cancelled twice, the notifier is never called on the second cancellation request, and hence for example a TMF might never finish. All the calls in scsi_req_cancel_async are idempotent, so the change is safe. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1450290827-30508-2-git-send-email-pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi')
-rw-r--r--hw/scsi/scsi-bus.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index a600074..00bddc9 100644
--- a/hw/scsi/scsi-bus.c
+++ b/hw/scsi/scsi-bus.c
@@ -1759,9 +1759,6 @@ void scsi_req_cancel_async(SCSIRequest *req, Notifier *notifier)
if (notifier) {
notifier_list_add(&req->cancel_notifiers, notifier);
}
- if (req->io_canceled) {
- return;
- }
scsi_req_ref(req);
scsi_req_dequeue(req);
req->io_canceled = true;
OpenPOWER on IntegriCloud