From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH 12/14] xen-blkback: safely unmap grants in case they are still in use Date: Wed, 14 Jan 2015 10:17:04 -0500 Message-ID: <54B68870.8060208@oracle.com> References: <1421077417-7162-1-git-send-email-david.vrabel@citrix.com> <1421077417-7162-13-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YBPh1-0005D6-GP for xen-devel@lists.xenproject.org; Wed, 14 Jan 2015 15:17:11 +0000 In-Reply-To: <1421077417-7162-13-git-send-email-david.vrabel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel , xen-devel@lists.xenproject.org Cc: Jenny Herbert List-Id: xen-devel@lists.xenproject.org > @@ -982,6 +1075,9 @@ static void __end_block_io_op(struct pending_req *pending_req, int error) > * the grant references associated with 'request' and provide > * the proper response on the ring. > */ > + if (atomic_dec_and_test(&pending_req->pendcnt)) > + xen_blkbk_unmap_and_respond(pending_req); > + > if (atomic_dec_and_test(&pending_req->pendcnt)) { Didn't code in this block go into xen_blkbk_unmap_and_respond_callback() and so it needs to be removed here? -boris > struct xen_blkif *blkif = pending_req->blkif; > >