From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGPBT-0001He-IW for qemu-devel@nongnu.org; Wed, 28 Jan 2015 04:45:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGPBL-0004qo-5r for qemu-devel@nongnu.org; Wed, 28 Jan 2015 04:45:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34434) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGPBK-0004q0-U8 for qemu-devel@nongnu.org; Wed, 28 Jan 2015 04:45:07 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0S9j6Gm016976 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 28 Jan 2015 04:45:06 -0500 Message-ID: <54C8AFA0.6050506@redhat.com> Date: Wed, 28 Jan 2015 10:45:04 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1422350219-1900-1-git-send-email-famz@redhat.com> In-Reply-To: <1422350219-1900-1-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] scsi: Fix scsi_req_cancel_async for no aiocb req List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org 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 > Signed-off-by: Fam Zheng > --- > 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