aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cpuset.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r--kernel/cpuset.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 6633f3fb6417..5a737ed9dac7 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -32,6 +32,7 @@
32#include <linux/kernel.h> 32#include <linux/kernel.h>
33#include <linux/kmod.h> 33#include <linux/kmod.h>
34#include <linux/list.h> 34#include <linux/list.h>
35#include <linux/mempolicy.h>
35#include <linux/mm.h> 36#include <linux/mm.h>
36#include <linux/module.h> 37#include <linux/module.h>
37#include <linux/mount.h> 38#include <linux/mount.h>
@@ -600,6 +601,7 @@ static void refresh_mems(void)
600 601
601 if (current->cpuset_mems_generation != my_cpusets_mem_gen) { 602 if (current->cpuset_mems_generation != my_cpusets_mem_gen) {
602 struct cpuset *cs; 603 struct cpuset *cs;
604 nodemask_t oldmem = current->mems_allowed;
603 605
604 down(&callback_sem); 606 down(&callback_sem);
605 task_lock(current); 607 task_lock(current);
@@ -608,6 +610,8 @@ static void refresh_mems(void)
608 current->cpuset_mems_generation = cs->mems_generation; 610 current->cpuset_mems_generation = cs->mems_generation;
609 task_unlock(current); 611 task_unlock(current);
610 up(&callback_sem); 612 up(&callback_sem);
613 if (!nodes_equal(oldmem, current->mems_allowed))
614 numa_policy_rebind(&oldmem, &current->mems_allowed);
611 } 615 }
612} 616}
613 617