mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] cpuset: Move node_isset() outside of the rcu_read region
@ 2020-09-16 11:23 yanfei.xu
  0 siblings, 0 replies; only message in thread
From: yanfei.xu @ 2020-09-16 11:23 UTC (permalink / raw)
  To: lizefan, tj, hannes; +Cc: cgroups, linux-kernel

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-16 19:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 11:23 [PATCH] cpuset: Move node_isset() outside of the rcu_read region yanfei.xu

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®