aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 4046434046e6..f80a5b7c057f 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1647,11 +1647,10 @@ static int kswapd(void *p)
1647 struct reclaim_state reclaim_state = { 1647 struct reclaim_state reclaim_state = {
1648 .reclaimed_slab = 0, 1648 .reclaimed_slab = 0,
1649 }; 1649 };
1650 cpumask_t cpumask; 1650 node_to_cpumask_ptr(cpumask, pgdat->node_id);
1651 1651
1652 cpumask = node_to_cpumask(pgdat->node_id); 1652 if (!cpus_empty(*cpumask))
1653 if (!cpus_empty(cpumask)) 1653 set_cpus_allowed_ptr(tsk, cpumask);
1654 set_cpus_allowed(tsk, cpumask);
1655 current->reclaim_state = &reclaim_state; 1654 current->reclaim_state = &reclaim_state;
1656 1655
1657 /* 1656 /*
@@ -1880,17 +1879,16 @@ out:
1880static int __devinit cpu_callback(struct notifier_block *nfb, 1879static int __devinit cpu_callback(struct notifier_block *nfb,
1881 unsigned long action, void *hcpu) 1880 unsigned long action, void *hcpu)
1882{ 1881{
1883 pg_data_t *pgdat;
1884 cpumask_t mask;
1885 int nid; 1882 int nid;
1886 1883
1887 if (action == CPU_ONLINE || action == CPU_ONLINE_FROZEN) { 1884 if (action == CPU_ONLINE || action == CPU_ONLINE_FROZEN) {
1888 for_each_node_state(nid, N_HIGH_MEMORY) { 1885 for_each_node_state(nid, N_HIGH_MEMORY) {
1889 pgdat = NODE_DATA(nid); 1886 pg_data_t *pgdat = NODE_DATA(nid);
1890 mask = node_to_cpumask(pgdat->node_id); 1887 node_to_cpumask_ptr(mask, pgdat->node_id);
1891 if (any_online_cpu(mask) != NR_CPUS) 1888
1889 if (any_online_cpu(*mask) < nr_cpu_ids)
1892 /* One of our CPUs online: restore mask */ 1890 /* One of our CPUs online: restore mask */
1893 set_cpus_allowed(pgdat->kswapd, mask); 1891 set_cpus_allowed_ptr(pgdat->kswapd, mask);
1894 } 1892 }
1895 } 1893 }
1896 return NOTIFY_OK; 1894 return NOTIFY_OK;