mm: clear N_CPU from node_states at CPU offline
authorToshi Kani <toshi.kani@hp.com>
Tue, 12 Nov 2013 23:08:13 +0000 (15:08 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 13 Nov 2013 03:09:09 +0000 (12:09 +0900)
commit807a1bd2b2a38845fd422b93328e7d69f13eb13a
tree355479f5a20d1ed71261bd9071583651e5983f4e
parentd7e0b37a87c39f5c02dd7b5d55c7a3ec2f65b943
mm: clear N_CPU from node_states at CPU offline

vmstat_cpuup_callback() is a CPU notifier callback, which marks N_CPU to a
node at CPU online event.  However, it does not update this N_CPU info at
CPU offline event.

Changed vmstat_cpuup_callback() to clear N_CPU when the last CPU in the
node is put into offline, i.e.  the node no longer has any online CPU.

Signed-off-by: Toshi Kani <toshi.kani@hp.com>
Acked-by: Christoph Lameter <cl@linux.com>
Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Tested-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmstat.c