ANDROID: mm: fix up removal of vm_total_pages problem

commit 92501cb670 ("ANDROID: add extra free kbytes tunable") added a
use of the vm_total_pages variable, which is now gone upstream.

So fix this up with a call to
nr_free_zone_pages(gfp_zone(GFP_HIGHUSER_MOVABLE) instead, which I
_think_ is the equivalent value.  Hopefully :)

Bug: 86445363
Bug: 109664768
Bug: 120445732
Cc: Rik van Riel <riel@redhat.com>
Cc: Colin Cross <ccross@android.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I78d4a0877fd2fc449e663e0f4aa047b1b21d4d2b
This commit is contained in:
Greg Kroah-Hartman
2020-08-08 13:51:17 +02:00
parent 7df9282d8e
commit aa9752dec8

View File

@@ -7789,7 +7789,7 @@ static void __setup_per_zone_wmarks(void)
tmp = (u64)pages_min * zone_managed_pages(zone);
do_div(tmp, lowmem_pages);
low = (u64)pages_low * zone_managed_pages(zone);
do_div(low, vm_total_pages);
do_div(low, nr_free_zone_pages(gfp_zone(GFP_HIGHUSER_MOVABLE)));
if (is_highmem(zone)) {
/*
* __GFP_HIGH and PF_MEMALLOC allocations usually don't