diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-12-16 19:33:44 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-12-17 17:33:49 +0100 |
commit | 36896bffd1330e09ee615f8c19d9e07520320a02 (patch) | |
tree | a7c5ff8299ee071de7226594cc4804e1f8056970 /hw | |
parent | 8aad35f678799e9ddf11201a619aefb7c0f18dec (diff) | |
download | qemu-36896bffd1330e09ee615f8c19d9e07520320a02.zip |
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')
-rw-r--r-- | hw/scsi/scsi-bus.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index a6000745bd..00bddc9270 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; |