From: Yang Yingliang <yangyingliang@huawei.com>
To: Maurizio Lombardi <mlombard@redhat.com>
Cc: <linux-kernel@vger.kernel.org>, <target-devel@vger.kernel.org>,
<linux-scsi@vger.kernel.org>, <hch@lst.de>,
<james.smart@broadcom.com>, <martin.petersen@oracle.com>
Subject: Re: [PATCH -next] scsi: efct: don't use GFP_KERNEL under spin lock
Date: Mon, 10 Jan 2022 20:10:41 +0800 [thread overview]
Message-ID: <ee058886-5bf0-db3e-7d78-8bc34bfd2440@huawei.com> (raw)
In-Reply-To: <20220110111921.GA91632@raketa>
Hi,
On 2022/1/10 19:19, Maurizio Lombardi wrote:
> On Mon, Jan 10, 2022 at 07:18:38PM +0800, Yang Yingliang wrote:
>> + spin_lock_irqsave(&node->els_ios_lock, flags);
>> +
>> if (els) {
>> /* initialize fields */
>> els->els_retries_remaining = EFC_FC_ELS_DEFAULT_RETRIES;
> If the els pointer is NULL you will lock the spinlock and disable the interrupts
> for no reason, maybe you can just protect the list_add_tail()?
>
> +spin_lock_irqsave(&node->els_ios_lock, flags);
> list_add_tail(&els->list_entry, &node->els_ios_list);
> +spin_unlock_irqrestore(&node->els_ios_lock, flags);
Yes, it's better, I will send a v2 later.
Thanks,
Yang
>
> Maurizio
>
> .
prev parent reply other threads:[~2022-01-10 12:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-10 11:18 [PATCH -next] scsi: efct: don't use GFP_KERNEL under spin lock Yang Yingliang
2022-01-10 11:19 ` Maurizio Lombardi
2022-01-10 12:10 ` Yang Yingliang [this message]
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=ee058886-5bf0-db3e-7d78-8bc34bfd2440@huawei.com \
--to=yangyingliang@huawei.com \
--cc=hch@lst.de \
--cc=james.smart@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mlombard@redhat.com \
--cc=target-devel@vger.kernel.org \
/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