]> 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>
Wed, 14 Dec 2011 05:48:08 +0000 (16:48 +1100)
commit3328c59a7b8129e9a6942743e39a79134b5e9b40
tree500137047d50c4ec1f8772a24b11b28e30fd2be1
parent8b4767d04ef9127b49b8f0ec89762a839f2450cf
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