Skip to content
Commit df0a6daa authored by Michal Hocko's avatar Michal Hocko Committed by Linus Torvalds
Browse files

mm: fix off-by-two in __zone_watermark_ok()



Commit 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: default avatarWang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: default avatarMichal Hocko <mhocko@suse.cz>
Acked-by: default avatarMel Gorman <mgorman@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9571a982
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment