]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: fix off-by-two in __zone_watermark_ok()
authorMichal Hocko <mhocko@suse.cz>
Thu, 8 Dec 2011 04:41:50 +0000 (15:41 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 13 Dec 2011 06:43:14 +0000 (17:43 +1100)
commitf26a038304e98988296f28dd1a44ccbe95f5f9d1
tree589804a2d5457d8435a180d88a48300d5083ac41
parent0bcd436fff07531e190b6451098a355ba94cf80e
mm: fix off-by-two in __zone_watermark_ok()

88f5acf8 ("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 <shhuiw@gmail.com>
Signed-off-by: Michal Hocko <mhocko@suse.cz>
Acked-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c