aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index eeb3bc9d1d36..661576324c7f 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2955,14 +2955,17 @@ int kswapd_run(int nid)
2955} 2955}
2956 2956
2957/* 2957/*
2958 * Called by memory hotplug when all memory in a node is offlined. 2958 * Called by memory hotplug when all memory in a node is offlined. Caller must
2959 * hold lock_memory_hotplug().
2959 */ 2960 */
2960void kswapd_stop(int nid) 2961void kswapd_stop(int nid)
2961{ 2962{
2962 struct task_struct *kswapd = NODE_DATA(nid)->kswapd; 2963 struct task_struct *kswapd = NODE_DATA(nid)->kswapd;
2963 2964
2964 if (kswapd) 2965 if (kswapd) {
2965 kthread_stop(kswapd); 2966 kthread_stop(kswapd);
2967 NODE_DATA(nid)->kswapd = NULL;
2968 }
2966} 2969}
2967 2970
2968static int __init kswapd_init(void) 2971static int __init kswapd_init(void)