[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] scsi: Fix scsi_req_cancel_async for no aiocb re
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] scsi: Fix scsi_req_cancel_async for no aiocb req |
Date: |
Wed, 28 Jan 2015 10:45:04 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
On 27/01/2015 10:16, Fam Zheng wrote:
> scsi_req_cancel_complete is responsible for releasing the request, so we
> shouldn't skip it in any case. This doesn't affect the only existing
> caller, virtio-scsi, but is useful for other devices once they use it.
>
> Suggested-by: Paolo Bonzini <address@hidden>
> Signed-off-by: Fam Zheng <address@hidden>
> ---
> hw/scsi/scsi-bus.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
> index 9b740a3..db39ae0 100644
> --- a/hw/scsi/scsi-bus.c
> +++ b/hw/scsi/scsi-bus.c
> @@ -1756,6 +1756,8 @@ void scsi_req_cancel_async(SCSIRequest *req, Notifier
> *notifier)
> req->io_canceled = true;
> if (req->aiocb) {
> blk_aio_cancel_async(req->aiocb);
> + } else {
> + scsi_req_cancel_complete(req);
> }
> }
>
>
Applied, thanks.
Paolo