projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mm: optimize put_mems_allowed() usage
[platform/adaptation/renesas_rcar/renesas_kernel.git]
/
kernel
/
cpuset.c
diff --git
a/kernel/cpuset.c
b/kernel/cpuset.c
index
e6b1b66
..
15b3ea6
100644
(file)
--- a/
kernel/cpuset.c
+++ b/
kernel/cpuset.c
@@
-1022,7
+1022,7
@@
static void cpuset_change_task_nodemask(struct task_struct *tsk,
task_lock(tsk);
/*
* Determine if a loop is necessary if another thread is doing
task_lock(tsk);
/*
* Determine if a loop is necessary if another thread is doing
- *
get_mems_allowed
(). If at least one node remains unchanged and
+ *
read_mems_allowed_begin
(). If at least one node remains unchanged and
* tsk does not have a mempolicy, then an empty nodemask will not be
* possible when mems_allowed is larger than a word.
*/
* tsk does not have a mempolicy, then an empty nodemask will not be
* possible when mems_allowed is larger than a word.
*/
@@
-1236,7
+1236,13
@@
done:
int current_cpuset_is_being_rebound(void)
{
int current_cpuset_is_being_rebound(void)
{
- return task_cs(current) == cpuset_being_rebound;
+ int ret;
+
+ rcu_read_lock();
+ ret = task_cs(current) == cpuset_being_rebound;
+ rcu_read_unlock();
+
+ return ret;
}
static int update_relax_domain_level(struct cpuset *cs, s64 val)
}
static int update_relax_domain_level(struct cpuset *cs, s64 val)