From: <yanfei.xu@windriver.com>
To: <lizefan@huawei.com>, <tj@kernel.org>, <hannes@cmpxchg.org>
Cc: <cgroups@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] cpuset: Move node_isset() outside of the rcu_read region
Date: Wed, 16 Sep 2020 19:23:42 +0800 [thread overview]
Message-ID: <20200916112342.25790-1-yanfei.xu@windriver.com> (raw)
From: Yanfei Xu <yanfei.xu@windriver.com>
It's no need to keep node_isset still in rcu_read region, just move
it outside of the rcu_read region.
Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
---
kernel/cgroup/cpuset.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 642415b8c3c9..51d51ed97deb 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -3443,9 +3443,9 @@ bool __cpuset_node_allowed(int node, gfp_t gfp_mask)
rcu_read_lock();
cs = nearest_hardwall_ancestor(task_cs(current));
- allowed = node_isset(node, cs->mems_allowed);
rcu_read_unlock();
+ allowed = node_isset(node, cs->mems_allowed);
spin_unlock_irqrestore(&callback_lock, flags);
return allowed;
}
--
2.18.2
reply other threads:[~2020-09-16 19:00 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=20200916112342.25790-1-yanfei.xu@windriver.com \
--to=yanfei.xu@windriver.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=tj@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
all inboxes | Powered by JetHome®