From: Cody P Schafer Date: Wed, 3 Jul 2013 22:01:41 +0000 (-0700) Subject: mm/page_alloc: don't re-init pageset in zone_pcp_update() X-Git-Tag: omap-for-v3.11/fixes-for-merge-window~17^2~393 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=169f6c1999ca6d0c5e06e8d810817ed3d1ebf017;p=pandora-kernel.git mm/page_alloc: don't re-init pageset in zone_pcp_update() When memory hotplug is triggered, we call pageset_init() on per-cpu-pagesets which both contain pages and are in use, causing both the leakage of those pages and (potentially) bad behaviour if a page is allocated from a pageset while it is being cleared. Avoid this by factoring out pageset_set_high_and_batch() (which contains all needed logic too set a pageset's ->high and ->batch inrespective of system state) from zone_pageset_init() and using the new pageset_set_high_and_batch() instead of zone_pageset_init() in zone_pcp_update(). Signed-off-by: Cody P Schafer Cc: Valdis Kletnieks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed