From: Kevin Wolf <kwolf@redhat.com>
To: Gan Qixin <ganqixin@huawei.com>
Cc: zhang.zhanghailiang@huawei.com, qemu-trivial@nongnu.org,
qemu-devel@nongnu.org, mreitz@redhat.com, dnbrdsky@gmail.com,
stefanha@redhat.com, kuhn.chenqun@huawei.com,
pbonzini@redhat.com
Subject: Re: [PATCH 4/4] block/iscsi.c: Use lock guard macros
Date: Wed, 2 Dec 2020 12:11:42 +0100 [thread overview]
Message-ID: <20201202111142.GC16765@merkur.fritz.box> (raw)
In-Reply-To: <20201109154327.325675-5-ganqixin@huawei.com>
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 <ganqixin@huawei.com>
> ---
> 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.
Kevin
next prev parent reply other threads:[~2020-12-02 11:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-09 15:43 [PATCH 0/4] Use lock guard macros in block Gan Qixin
2020-11-09 15:43 ` [PATCH 1/4] block/accounting.c: Use lock guard macros Gan Qixin
2020-11-09 15:43 ` [PATCH 2/4] block/curl.c: " Gan Qixin
2020-11-09 15:43 ` [PATCH 3/4] block/throttle-groups.c: " Gan Qixin
2020-12-02 11:12 ` Kevin Wolf
2020-11-09 15:43 ` [PATCH 4/4] block/iscsi.c: " Gan Qixin
2020-12-02 11:11 ` Kevin Wolf [this message]
2020-12-03 7:04 ` ganqixin
2020-12-02 9:22 ` [PATCH 0/4] Use lock guard macros in block Markus Armbruster
2020-12-02 9:33 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201202111142.GC16765@merkur.fritz.box \
--to=kwolf@redhat.com \
--cc=dnbrdsky@gmail.com \
--cc=ganqixin@huawei.com \
--cc=kuhn.chenqun@huawei.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=stefanha@redhat.com \
--cc=zhang.zhanghailiang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).