Commit 9f41da81 authored by Jack Cheung's avatar Jack Cheung
Browse files

mm: Cast lowmem_reserve to long



z->lowmem_reserve[classzone_idx] is an unsigned long but
free_pages and min are longs. If free_pages is
negative, the function will incorrectly return true
because it will treat the negative long as a large,
positive unsigned long.

This change casts z->lowmem_reserve to a long and
fixes a typo in the comment.

Change-Id: Icada1fa5ca650fbcdb0656f637adbb98f223eec5
Signed-off-by: default avatarJack Cheung <jackc@codeaurora.org>
parent 2c60124c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment