> -----Original Message----- > From: Kevin Wolf [mailto:[email protected]] > Sent: Wednesday, December 2, 2020 7:12 PM > To: ganqixin <[email protected]> > Cc: [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected]; Zhanghailiang <[email protected]>; > Chenqun (kuhn) <[email protected]> > Subject: Re: [PATCH 4/4] block/iscsi.c: Use lock guard macros > > Am 09.11.2020 um 16:43 hat Gan Qixin geschrieben: > > Replace manual lock()/unlock() calls with lock guard macros > > (QEMU_LOCK_GUARD/WITH_QEMU_LOCK_GUARD) in block/iscsi.c. > > > > Signed-off-by: Gan Qixin <[email protected]> > > --- > > block/iscsi.c | 28 +++++++++++++--------------- > > 1 file changed, 13 insertions(+), 15 deletions(-) > > > > diff --git a/block/iscsi.c b/block/iscsi.c index > > e30a7e3606..f5f657b582 100644 > > --- a/block/iscsi.c > > +++ b/block/iscsi.c > > @@ -322,7 +322,7 @@ iscsi_aio_cancel(BlockAIOCB *blockacb) > > IscsiAIOCB *acb = (IscsiAIOCB *)blockacb; > > IscsiLun *iscsilun = acb->iscsilun; > > > > - qemu_mutex_lock(&iscsilun->mutex); > > + QEMU_LOCK_GUARD(&iscsilun->mutex); > > > > /* If it was cancelled or completed already, our work is done here */ > > if (acb->cancelled || acb->status != -EINPROGRESS) { > qemu_mutex_unlock(&iscsilun->mutex); > return; > } > > I don't think this qemu_mutex_unlock() is right any more now.
You are right, I ignored this qemu_mutex_unlock(). I will correct it and resubmit. :) Thanks, Gan Qixin > > Kevin
