From: Michal Hocko Date: Tue, 10 Jan 2012 23:08:02 +0000 (-0800) Subject: mm: fix off-by-two in __zone_watermark_ok() X-Git-Tag: sz_154~128 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=567f29ffd86f9836da7b6ab96bd1bb8e2e88fbd9;p=pandora-kernel.git mm: fix off-by-two in __zone_watermark_ok() Commit 88f5acf88ae6 ("mm: page allocator: adjust the per-cpu counter threshold when memory is low") changed the form how free_pages is calculated but it forgot that we used to do free_pages - ((1 << order) - 1) so we ended up with off-by-two when calculating free_pages. Reported-by: Wang Sheng-Hui Signed-off-by: Michal Hocko Acked-by: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed