From: Hui Su <sh_def@163.com>
To: sh_def@163.com, leon@kernel.org, jgg@ziepe.ca,
keescook@chromium.org, kvalo@codeaurora.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] async.c: reduce the critical region in lowest_in_progress()
Date: Thu, 15 Oct 2020 22:05:10 +0800 [thread overview]
Message-ID: <20201015140510.GA19561@rlk> (raw)
The judgement of first do not need to be in the critical region.
So move it out.
Signed-off-by: Hui Su <sh_def@163.com>
---
kernel/async.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/async.c b/kernel/async.c
index 33258e6e20f8..9d33ffcc84c7 100644
--- a/kernel/async.c
+++ b/kernel/async.c
@@ -96,10 +96,10 @@ static async_cookie_t lowest_in_progress(struct async_domain *domain)
struct async_entry, global_list);
}
+ spin_unlock_irqrestore(&async_lock, flags);
if (first)
ret = first->cookie;
- spin_unlock_irqrestore(&async_lock, flags);
return ret;
}
--
2.25.1
reply other threads:[~2020-10-15 14:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20201015140510.GA19561@rlk \
--to=sh_def@163.com \
--cc=jgg@ziepe.ca \
--cc=keescook@chromium.org \
--cc=kvalo@codeaurora.org \
--cc=leon@kernel.org \
--cc=linux-kernel@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